Autopopulate the month/year

  • PracMed_NZ
    Asked on January 4, 2022 at 8:20 PM

    Hi Team,

    We have forms that need to mark just the year and the month it was submitted to trigger an action in Activecampaign (the month/year will be a tag that triggers an automation). We already have a hidden date picker which generates the full date (which we need for another report). My thought was to add a hidden DatePicker year month widget - just wondering how I set that up so it auto populates with the current date/month of submission.


    Thanks! :)

    Steph

  • Sweta JotForm Support
    Replied on January 5, 2022 at 2:47 AM

    Greetings Steph!

    You can extract the month and date from the Date Picker element using a Substring widget:

    1641368821 61d54cf52b252  Screenshot 10

    Please go through the Demo form link:

    https://form.jotform.com/220040950319951

    Should you have any further queries, please let us know.

    Thanks.

  • PracMed_NZ
    Replied on January 5, 2022 at 8:05 PM

    Thanks for the reply - I can't seem to get it to work.

    I have {date} as the field ID1641431051 61d6400bef1e1 Screen Shot 202 Screenshot 101641431096 61d6403899217 Screen Shot 202 Screenshot 21

    but nothing is populating when I do test runs. This is how it looks, there is nothing under it.

    1641431137 61d640613e9da Screen Shot 202 Screenshot 32


    Thanks for your help! :)

  • Sweta JotForm Support
    Replied on January 5, 2022 at 9:44 PM

    You need to write the Field ID and not the unique name.

    You can get the Field Id this way:

    1641437062 61d657866f557  Screenshot 10

    Thanks.