label gets value from $POST after submit
-
In my contact-form-7 I use 3 mailpoet elements like so:
[mailpoetsignup mailpoetsignup-123 mailpoet_list_4 default:on “Fruitplukker”]
[mailpoetsignup mailpoetsignup-124 mailpoet_list_3 default:on “Snoeien en onderhoud”]When I click the submit-button with the mailpoet-items checked but input fields blank (I want to get en error) the label-tags are replaced with the value from the $POST. The checkbox value on initial load is set to ‘mailpoet_list_’ + id (like ‘mailpoet_list_3’). In your plugin on line 95 of mailpoet-signup.php the variable $value is overwritten by the content of the $POST element ($_POST[ $tag->name ]) but thats not the same as de initial name of the Label element.
So why is the initial value, which it get from $tag->values on line 87, replace by the POST value? Its not to get the checkbox checked, thats done by the atts on the form element. Which Is not working properly because its only checking for the default state (line 84) and not if the element is also in the $POST. And even if the form is submitted without an error there is probably still a $POST ‘living’.
Is this a bug or is this my page with multiple forms and multiple mailpoetsignup’s within the form.
Thanx Martin
- The topic ‘label gets value from $POST after submit’ is closed to new replies.