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.

Creating Form On on the Fly (runtime)

  1. yoavadler
    Member

    Hi there
    So, my question might have been answered in the past, but after 30 m searching i think i have low chances of finding it
    So, you might direct me to the answer:
    i want to know how i can create a form on the fly? i.e.:
    i have a post with a specific custom field with a number . once a user enters this post, i need to create a form that has HTML options tag according the the value in the custom field.Of course this value change from post to post.
    So, the solution is using a specific GF filter but i would appreciate if you can direct me to the filter with a simple example

    thanks
    Yoav

    Posted 13 years ago on Monday June 13, 2011 | Permalink
  2. I'm not 100% sure what you are asking so let me see if I got this right..

    You want to auto populate a field on your form using data stored in a custom field on your posts?

    What kind of field? A hidden field on your form so the user does not see it but you'll see it when it is submitted?

    Posted 13 years ago on Monday June 13, 2011 | Permalink
  3. yoavadler
    Member

    Hi
    It a yes/no quiz . in each form i have the question's in the post content.,and i have the number in the custom field.now what i want is once user enters the post, to generete the form according to the number .so, the number of the options will change based on each post.

    Posted 13 years ago on Tuesday June 14, 2011 | Permalink
  4. I'm not sure how you can do this. You would probably have to use the gform_pre_render hook to change the form dynamically, but i'm not sure off the top of my head an easy way to do this. It's going to require custom code and using the gform_pre_render hook to manipulate the form before it is displayed.

    Posted 13 years ago on Tuesday June 14, 2011 | Permalink