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.

Bug: gform_admin_pre_render + Enable Conditional Logic is broken

  1. So I'm dynamically populating a drop down everything works fine on the front-end, utilizing

    add_action("gform_pre_render", "foo");

    but I noticed in the admin that it wasn't populating the drop down with any values. Now, I know it doesn't need to show the values from the dynamic population, but it is pretty bleh to not be able to see them there. So I decided to use

    add_action("gform_admin_pre_render", "foo");

    to populate it in the admin. However, whenever I do that, it breaks the ability to use conditional logic on the form. It returns with a javascript error:

    choiceValue.replace is not a function

    on line 4041

    Since it doesn't affect the way the forms work on the front-end or back-end and submission, this isn't that huge an issue, but it's a bug I thought I'd point out none-the-less.

    Posted 12 years ago on Wednesday August 24, 2011 | Permalink
  2. This isn't a bug. It's simply not a feature.

    You can't currently dynamically populate a drop down and use that drop down for conditional logic.

    But it is a good point, we can look at how to handle this in a future release.

    Posted 12 years ago on Wednesday August 24, 2011 | Permalink
  3. Well actually, that's not exactly the case. I don't want to use the dynamically populated drop down for the conditional.

    I just wanted to use conditional logic on another field from a non-dynamically populated field that happens to be in the same form that has dynamically populated content.

    It breaks the conditional logic functions all together, not just on the dynamic field.

    Posted 12 years ago on Wednesday August 24, 2011 | Permalink
  4. Interesting, i'll have our lead developer look at this. He may have some additional questions for you.

    Posted 12 years ago on Wednesday August 24, 2011 | Permalink
  5. Can you use http://pastie.org to post the custom code that you have implemented?

    This way we can try testing with the exact same custom code you have implemented.

    Posted 12 years ago on Wednesday August 24, 2011 | Permalink
  6. Sorry it took so long to reply back to this, I got pulled off this project and onto another one so it fell to the back burner for a bit. So here is relevant code that I'm using:

    http://pastie.org/private/l7tjgbrzebgpxrf4sje4a

    I also have a video of the "bug" in action, however I can not post the URL publicly because it does have sensitive information in it, so if you'll give me a way to get you that URL privately I'll send it to you if you want to see the problem.

    Posted 12 years ago on Thursday October 6, 2011 | Permalink
  7. Hi Taproot,

    You can send that video link to david@rocketgenius.com. Appreciate you taking the time to help us figure this out. :)

    Posted 12 years ago on Monday October 10, 2011 | Permalink
  8. Sent =) lemme know if you need anything else.

    Posted 12 years ago on Monday October 10, 2011 | Permalink