Hello,
I tried to use your function but I get an internal server error. Code 500
Then I noticed I had to change some values but it did not work out. I am really not good with writing functions so I am looking to the code without a sollution.
function your_form_handler($content, $atts, $post){
if ($post->ID == "285"){
$content .= '<p>
<textarea name="opmerkingen" id="opmerkingen" rows="10" required="required" placeholder="a placeholder"></textarea>
</p>';
}
return $content
}
add_filter( 'lh_signing_intermediate_logged_out_form_filter', "your_form_handler", 10, 3);
public function your_post_handler($user_id){
if ($_POST['opmerkingen']){
add_user_meta( $user_id, 'opmerkingen', sanitize_text_field($_POST['opmerkingen']));
}
}
add_filter( 'lh_signing_http_post_filter', "your_post_handler", 10, 1 );
What I did:
Changed all the ‘ abd ” in the correct ones because they where different as the rest of my code.
Changed post id to the id of the post with the shortcode
Changed text area name and id,
Changed the your-text area in the line with sanitize text field into the name opmerkingen.
But now I do not have any clue. I think the ” your_post_handler” or ” your_form_handler” and ” your_meta_key” Should be changed with my own value but .. really I do not know.
Or do I have to make the database table myself?
It’s one of the last things I need to do for the website to get it live. It is a sort of protest idea against the political situation in the Netherlands. I do not know your rates but I know there is no to very less money.. .I can send you a small donation if you like
I really hope you can help me add a text area in the form .. its also ok if it appears in all froms because I only use one. The text area’s content has to get in the database also, just like the name, last name and email.
Can you help me once again please?
Have a great day.
Jap