• Resolved Arvind

    (@arvindwp)


    Can you please explain pre-populating the number field. Documentations reads this much that I couldn’t decipher / implement — ” Lastly, to pre-populate the field dynamically using a query parameter passed in your form URL, enter a query parameter key in the?Query parameter?field.”

    For example, I want the field to be pre-populated with unique submission number + making the field invisible + so that site visitor does not need to fill it herself.

    I am sure this is do-able. Only that I am not techy enough to understand the “query parameter”

    Thanks in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    Hi @arvindwp

    I hope you’re well today and thank you for your question!

    The “pre-populate” feature which you’re referring to is there to make it possible to prefill the field with a data sent e.g. via link.

    So for example:

    – add the number-type field to the form
    – in its settings put word “width” (this can be anything else as long as it’s not WordPress reserved word; this is just an example)
    – now let’s say that form is on page site.com/myform so visit it like this

    site.com/myform/?width=20

    and you’ll see that your number field is already prefilled with value of 20.

    You can use it if you’re sending visitor to the form via some link on page but if the form page is visited directly – it will not work.

    What you want to achieve is doable if you use field of type “Hidden”:

    – add a field of type “hidden” to the form
    – in field settings select “Submission ID” from the “Default Value (optional)” drop-down menu and save the form

    The field will automatically include unique submission ID (automatically generated by Forminator) and you’ll see it in submissions on Formiantor -> Submissions page but visitor will not need to put anything in that field and they will not see it.

    Best regards,
    Adam

    Thread Starter Arvind

    (@arvindwp)

    Excellent! Done. I had not explored the HIDDEEN field type. How easy it is! Thanks once again.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Pre-populating the number field’ is closed to new replies.