Import and use a variable in additional settings of Contact Form 7 [closed]

if only the domain changes, you could try using relative urls: document.location=”/thank-you”; But if the domain you’re redirecting to is different than the page you’re on, a simple way to fix this problem would be to add a customizer value redirect_domain, and then make it a global variable in footer.php <script>var RedirectUrl=<?php echo get_theme_mod(redirect_domain);?></script> then … Read more

How to do Conact form 7 name field validation? [closed]

According to the documentation you have to create a custom filter to support it – you can do it like this: add_filter( ‘wpcf7_validate_text*’, ‘custom_text_validation_filter’, 20, 2 ); function custom_text_validation_filter( $result, $tag ) { if ( ‘your-name’ == $tag->name ) { // matches any utf words with the first not starting with a number $re=”/^[^\p{N}][\p{L}]*/i”; if … Read more

How to pull and auto display custom fields values to contact form

May be try like this: foreach( $post_ids->posts as $id): // get the post title, and apply any filters which plugins may have added // (get_the_title returns unfiltered value) $name[] = apply_filters(‘the_title’, get_the_title($id)); $lname[] = get_post_meta($id, ‘last_name’, TRUE); $address[] = get_post_meta($id, ‘address’, TRUE); $cinfo[] = get_post_meta($id, ‘contact_info’, TRUE); endforeach; $data = [‘fname’=>$name, ‘lname’=>$lname, ‘address’=>$address, ‘cinfo’=>$cinfo]; <script> … Read more