Title: Field populate dynamically (via php hook) bug
Last modified: August 31, 2016

---

# Field populate dynamically (via php hook) bug

 *  [iNexi](https://wordpress.org/support/users/inexi/)
 * (@inexi)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/field-populate-dynamically-php-bug/)
 * 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](https://www.gravityhelp.com/documentation/article/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/](https://wordpress.org/plugins/gravity-forms-data-persistence-add-on-reloaded/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [unclhos](https://wordpress.org/support/users/unclhos/)
 * (@unclhos)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/field-populate-dynamically-php-bug/#post-7154744)
 * 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](https://wordpress.org/support/users/inexi/)
 * (@inexi)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/field-populate-dynamically-php-bug/#post-7154749)
 * Why support dynamic population from query strings, but not the php hook? Same
   function, just different sources…
 *  Thread Starter [iNexi](https://wordpress.org/support/users/inexi/)
 * (@inexi)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/field-populate-dynamically-php-bug/#post-7154752)
 * 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](https://wordpress.org/support/users/unclhos/)
 * (@unclhos)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/field-populate-dynamically-php-bug/#post-7154776)
 * 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.

 * ![](https://s.w.org/plugins/geopattern-icon/gravity-forms-data-persistence-add-
   on-reloaded.svg)
 * [Gravity Forms Data Persistence Add-On Reloaded](https://wordpress.org/plugins/gravity-forms-data-persistence-add-on-reloaded/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/gravity-forms-data-persistence-add-on-reloaded/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/gravity-forms-data-persistence-add-on-reloaded/)
 * [Active Topics](https://wordpress.org/support/plugin/gravity-forms-data-persistence-add-on-reloaded/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gravity-forms-data-persistence-add-on-reloaded/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gravity-forms-data-persistence-add-on-reloaded/reviews/)

## Tags

 * [dynamically](https://wordpress.org/support/topic-tag/dynamically/)
 * [hook](https://wordpress.org/support/topic-tag/hook/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [populate](https://wordpress.org/support/topic-tag/populate/)

 * 4 replies
 * 2 participants
 * Last reply from: [unclhos](https://wordpress.org/support/users/unclhos/)
 * Last activity: [10 years, 2 months ago](https://wordpress.org/support/topic/field-populate-dynamically-php-bug/#post-7154776)
 * Status: not resolved