Fix for Validation Error when using multiple forms
-
I previously posted here about generic errors which prevented form submission when using multiple form/lists throughout a site.
I’ve created a patch. These edits are all to the mailigen-widget.php file:
around line 104 remove this line:
$errors = $this->validate($fields);and add this line below the $listId declaration at about line 114:
$errors = $this->validate($fields, $listId);Next around line 157 change the validate function declaration to:
function validate($fields = array(), $selected_list = '') {Finally change this around line 160:
$allFieldsParams = $this->getOption('mg_fields');to this:
if( isset( $selected_list ) ) { $allFieldsParams = $this->getOption('mg_fields_'.$selected_list); }else{ $allFieldsParams = $this->getOption('mg_fields'); }This will effectively validate the fields that relate to the specific OptIn vs the generic list OptIn.
Hope this helps.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
The topic ‘Fix for Validation Error when using multiple forms’ is closed to new replies.