• I have a field marked “Do not allow persistence” on a form using data persistence. That field is also checked to “Allow field to be populated dynamically” with a parameter specified.

    When populating that value via a query string (“/?parameter_name=abc”) it behaves correctly on a new entry, or a persistent entry.

    When populating that value via a PHP hook (the gform_field_value_$parameter_name hook) it behaves correctly on a new entry (including overriding the query string parameter), but incorrectly on a persistent entry.

    On a persistent entry, the PHP hook has no effect.

    https://wordpress.org/plugins/gravity-forms-data-persistence-add-on-reloaded/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author unclhos

    (@unclhos)

    In your case it may be “incorrect”. I have thought about this before, about putting a priority system in place. The purpose of the plugin has always been to bring the user back to the same place they were when the left. Why you would want to change that I don’t understand. But I’ll look into it.

    Thread Starter iNexi

    (@inexi)

    Why support dynamic population from query strings, but not the php hook? Same function, just different sources…

    Thread Starter iNexi

    (@inexi)

    Also, in this case, this field is marked “Do not allow persistence”, so I would expect it to be totally removed from your system.

    Plugin Author unclhos

    (@unclhos)

    I don’t remember why i added support for the query strings. Maybe in preparation for a priority system. I looked at adding support for the filter method you are using and its going to take a lot of rework to get it done. The $_POST seems to be short circuiting Gravity Forms to even going to that part of the code.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Field populate dynamically (via php hook) bug’ is closed to new replies.