Forum Academy Marketplace Showcase Pricing Features

Use Checkbox to Set Date

I have a date input that is blank and hidden. Next to it is a standard checkbox (unchecked/no by default). When someone selects that checkbox, I have it unhide the date input and set it to the current date.

The problem I am having, is that date field updates every day to show the current date. I want it to stick with the date the checkbox was selected. For example, if I select the checkbox on 6/15/21, it inputs the date correctly as 6/15/21. The problem is that the date updates each and every day to show the current date.

I’m not sure what to do to have it stick with the date the checkbox was checked. Any ideas? Seems simple, but the solution just isn’t coming to me.

Hi there, @doug4… I think it is simple, but only if you save the date when the checkbox was checked somewhere in a data type (maybe save it in a field on the User data type). Outside of saving it somewhere, I can’t think of a way to do what you have described.


Ok, that seems possible. I am surprised there isn’t an easier way, but understand not everything will conform to how I want it to work.

Trying to think through this. If I setup a date type that is a date field that corresponds to the checkbox in question, that is easy enough to do. I assume I would have the date show the initial content of that new date data type? That only leaves me with setting the date for that field when the checkbox is selected. Any suggestions on how to do that?

I’m not sure I would add a new data type just for that date field, but regardless, yes, the initial content of the date input would be tied to the new field. With regard to saving a date to that field and setting the initial content of the date input when the checkbox is checked, you could use the An input’s value is changed workflow action to set the field in question to the current date when the checkbox is checked, and if you put the date input in a group, you could have the last step in the workflow reset the group, and I believe that would display the saved date.

Thank you mikeloc, I am implementing now, but this appears to be the solution.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.