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.

Dynamically Populate Product Dropdown

  1. I am trying to build an order form where a user can select a product from a dropdown list, add a quantity, and submit. The product list will be dynamically populated.

    I have used the gform_pre_render hook to customize other dropdown fields, but I am not having success in customizing a product dropdown. I have looked at the gform_product_info hook, but I am not sure how I would add multiple values that way.

    What I need to know is:
    Am I passing an array to gform_pre_render or to gform_product_info (or something else?) to populate a product dropdown?

    What is the structure of that array?

    Posted 12 years ago on Tuesday December 27, 2011 | Permalink
  2. I have forwarded this post to a member of our development team who will take a look and provide you with some input. Things are a bit slow here right now due to the holidays, the developer I have assigned it to should be in the office tomorrow (Wednesday) and will reply then. Thanks!

    Posted 12 years ago on Wednesday December 28, 2011 | Permalink
  3. Hi Bill,

    You should be able to use the gform_pre_render to add the product as an option to a product drop down. Here is some sample code:

    http://pastie.org/3091348

    Posted 12 years ago on Thursday December 29, 2011 | Permalink

This topic has been resolved and has been closed to new replies.