Expand my Community achievements bar.

SOLVED

Drop down date boxes

Avatar

Former Community Member

This is going to sound silly, but here goes. I've created a form that has date fields. My employer wants the fields to be drop down boxes. So i have a drop down for day, month, and year.  I have dates starting with 1900 going all the way up to 2025. There will not be anyone updating the form regularly, therefore, to avoid the maintenance of the form, they want the dates in the future. Is there any way at all, to allow up to the current year only (2010) to show up on the drop down? And in December of each year, the new year will be added to the drop down automatically? Is there a code for that?

Any help anyone can suggest is greatly appreciated.


Thank you,

Nik

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

You woudl have to write an elaborate script to populate the DDList when the form renders. You woudl be basing your DDList calculations on the system clock...so if that is set wrong then your DDList woudl be wrong also. You can leave the future dates in there and check that tey did not pick something in the future after the fact.

Paul

View solution in original post

5 Replies

Avatar

Former Community Member

I don't think so ....whats wrong with a calendar.....certainly beats the heck out fo DDLists for dates?

Paul

Avatar

Former Community Member

Well, thats what I suggested in the first place, but my employer doesnt think its user friendly. So im trying to make it work this way. I just dont want the date showing into the future because that doesnt look professional at all. If someone can choose their date of birth, and put 2015 as their birth year, that just doesnt make any sense.
Thanks for your response though!

Avatar

Correct answer by
Former Community Member

You woudl have to write an elaborate script to populate the DDList when the form renders. You woudl be basing your DDList calculations on the system clock...so if that is set wrong then your DDList woudl be wrong also. You can leave the future dates in there and check that tey did not pick something in the future after the fact.

Paul

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----