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.

Populate 2 hidden fields with data from another field

  1. Hi, I want to populate 2 hidden quantity fields with the same data from a number box on the same page of the same form, is this possible? I've seen other examples that pull data from a previous page but none that do it from the same page.

    Thanks

    Posted 6 years ago on Wednesday November 28, 2012 | Permalink
  2. Do they need to be populated before the form is submitted? If so, you will need to do this with jQuery: watch for the value to be entered in the number box, then populate your hidden field. Check out the jsfiddle demo linked in this answer at stackoverflow: http://stackoverflow.com/a/10884755

    If you can do it after the form is submitted, you can use the gform_pre_submission filter to copy the value from one field to another: http://www.gravityhelp.com/documentation/page/Gform_pre_submission

    Posted 6 years ago on Saturday December 1, 2012 | Permalink