Data loaded from MySQL missing on form
-
I have my form’s data stored in a MySQL database. I use the wpcf7_form_tag filter hook to retrieve and add a field’s value from the database and set it in the tag. I can tell that the tag’s values, raw_values and labels are being set with the MySQL data, but when the form entry is displayed, the field is blank. What could cause the tags I update in my filter to be reset? I have disabled all other CF&-related plugins. Here is the code I use to set the a tag’s new values after matching on the tag’s name:
$tag[‘raw_values’][0] = $sanitized_value;
$pipes = new WPCF7_Pipes( $sanitized_value );
$tag[‘values’] = $pipes->collect_befores();
$tag[‘labels’] = $pipes->collect_afters();
$tag[‘pipes’] = $pipes;$tag = set_default_option( $tag, 1 );
return $tag;
The topic ‘Data loaded from MySQL missing on form’ is closed to new replies.