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.

What to call to dynamically populate 'Pricing Fields->Options' drop down list?

  1. I am using the 'gform_pre_render_' filter and want to target the drop down in a Pricing Options form element. I tried this, but it only changes 'Standard Fields->Drop Down' elements:

    if($field['type'] != 'select' || strpos($field['cssClass'], 'populate-posts') === false)

    The filter is set up like it is used in this article: Dynamically Populating Drop Down Fields. And the post Gravity Forms CSS: Targeting Specific Elements doesn't cover Pricing Fields.

    Can anyone give me a rundown on the elements generated by the Pricing Fields? Please?

    Posted 7 years ago on Thursday November 8, 2012 | Permalink
  2. So, after doing a little digging you have to target the $field['type'] of product instead of select. In the end the if statement looks like this:

    if($field['type'] != 'product' || strpos($field['cssClass'], 'populate-posts') === false)

    Posted 7 years ago on Thursday November 8, 2012 | Permalink