How to disable autocomplete for inputs in contact form 7? [closed]

Autocomplete tag in form settings does not work anymore (as today Contact Form 7 plugin version 5.1.3. The only solution which worked for me was to add custom attributes thanks to https://stackoverflow.com/a/46316728/1720476. E.g. if You have FirstName and LastName fields, where You want to disable autocomplete. Add this into functions.php file: add_filter( ‘wpcf7_form_elements’, ‘imp_wpcf7_form_elements’ ); … Read more

Custom contact form 7 select with custom values [closed]

You can set the values with the filter wpcf7_form_tag and add the shortcode attributes with the filter shortcode_atts_wpcf7 add_filter(“wpcf7_form_tag”, function($scanned_tag, $replace){ if (“press_post” === $scanned_tag[“name”]) { $contact_form = WPCF7_ContactForm::get_current(); $number_of_posts = $contact_form->shortcode_attr(“number_of_posts”); $post_type = $contact_form->shortcode_attr(“post_type”); // using $number_of_posts and $post_type here $scanned_tag[‘raw_values’] = [ “number_of_posts \”$number_of_posts\” – post_type \”$post_type\” | val 1″, “Test 2|val 2”, … Read more

Contact form 7 dynamic text extension – populate form with title from previous page [closed]

There are two steps to this process: 1. Make sure you have your form set up correctly. Your form should include the ‘dynamictext’ tag, and use the correct syntax as described on the plugin page. For example, you may want something like: [dynamictext theproductname “CF7_GET key=’foo'”] This will set anything after the “foo” $_GET URL … Read more

Vue.js + AJAX Shortcode

My solution was simpler than I thought…. Since I’m just trying to execute shortcodes in the frontend, I can just localize the script and pass the shortcodes as variables: functions.php wp_localize_script( ‘BUILD-script’, ‘sharedData’, array( ‘ajax_url’ => admin_url( ‘admin-ajax.php’ ), ‘mailchimpForm’ => do_shortcode(‘[mc4wp_form id=”100″]’), ‘contactForm’ => do_shortcode(‘[contact-form-7 id=”98″ title=”Contact form 1″]’) ) ); Basically I’m jus … Read more

Contact Form 7 – Populating dropdown list with terms relative to the post

Use the dynamic_dropdown tag functionality offered by the Smart Grid layout extension. The dynamic tag can take 3 sources of data (a given taxonomy, or branch within that taxonomy, a list of post titles, or the results of a filtered hook function). Use the filter hook to populated your dropdown as, add_filter(‘cf7sg_dynamic_dropdown_custom_options’, ‘filter_options’,10,3); function filter_options($options, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)