Front-end acf form with custom post_id may causes parse error
-
Hi,
I’m currently using ACF: validated field 1.3.1 & ACF 4.3.9.
I have a acf front-end form that create new custom post whenever a user submits the entry. As documented at here, I need to provide a custom post_id to identify a new post. The following is my code:
acf_form(array( 'field_groups' => array('13468'), 'post_id' => 'new-organisation', 'post_title' => false, 'submit_value' => 'Submit', 'updated_message' => 'Membership application submitted successfully.' ));
The parse error was thrown when a non-numeric post_id is passed into the validate function.
I wrapped the $post_id with double-quotes at line 300 in validated_field_v4.php to temporarily solved this problem:
$php.= '$valid = '.$function_name.'( "'.$post_id.'", "'.$post_type.'", "'.$this_key.'", "'.addslashes( $value ).'", "'.addslashes( $prev_value ).'", $message );'."\n";
Hopefully there will be an update to address this issue. Thanks again for this excellent plugin!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Front-end acf form with custom post_id may causes parse error’ is closed to new replies.