Current date is set for date question when I want the field to be blank

If the usecase is to return a date for the form - either the user-specified date if they enter it, otherwise the current date - you should be able to accomplish this with:

Q1: id=userdate, type="date"
Q2: id=returndate, type="date", calculate="coalesce(${userdate},today())"

Where Q2 returndate is the actual result that you are really interested in. Basically, if userdate is set then it'll return it, otherwise it'll return today's date. [note: this calculation will be constantly re-evaluated as you fill in the form, so today's date will be whatever it is when you finally submit the form].

You might also want to look at this previous thread.

1 Like