PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Sending parameters to a form

  1. Is it possible to send parameters to a form, for example to pre-populate one of the fields or a hidden field?

    Posted 13 years ago on Saturday January 22, 2011 | Permalink
  2. Yes, it is possible to pre-populate fields using the querystring or via PHP.

    In order to do this you need to setup your field(s) to be populated dynamically. You do this by editing your form, then select the field you want to populate dynamically and edit that field.

    Select the "Advanced" tab and then check the "Allow field to be populated dynamically" checkbox. This will then provide a UI for you to give the field a Parameter name. The parameter name is what is then used to populate the field dynamically.

    For example, if you have an email field and you allow it to be populated dynamically and give it a parameter name of "email" if you then pass ?email=your@email.com when calling the page or post that contains the form... the email field will be pre-populated with the value of the email parameter.

    This can be done with both visible and hidden fields. You can either populate them via the query string or using PHP.

    Here's an example:

    http://forum.gravityhelp.com/topic/pass-custom-field-from-a-post-into-a-form-that-post-links-to#post-14327

    Posted 13 years ago on Saturday January 22, 2011 | Permalink
  3. You rock - thank you Carl!

    Posted 13 years ago on Saturday January 22, 2011 | Permalink