Use field input to dynamically populate (hidden) field

I want to use input from Datepicket to populate 3 hidden fields. Our API expects [date_day] and [date_month] and [date_year] so I created 3 hidden fields and trying to have them populated based on the date selected in the Datepicker earlier on in the form but I don’t know what to fill in here:
image

Lot of topics in the community, but can’t find the right answer.

The merge tags will not work live on the form like that. The easiest way to accomplish that is by using the Populate Anything perk from Gravity Wiz:

Another way to do it, without that plugin, would be the gform_pre_submission filter. It will require some code, but you can generate those parts of the data from the submitted date, and store that in your hidden fields in the form. It will require some code:

The last possibility would be if the API had a filter or function to change the submitted data before sending it to the API. Our plugins can use this filter:

I’m not sure what your API is or how the integration works, but that may be a possibility.

1 Like