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' );
function imp_wpcf7_form_elements( $content ) {
$str_pos = strpos( $content, 'name="FirstName"' );
if ($str_pos) {
$content = substr_replace( $content, ' autocomplete="both" autocomplete="off" ', $str_pos, 0 );
}
$str_pos = strpos( $content, 'name="LastName"' );
if ($str_pos) {
$content = substr_replace( $content, ' autocomplete="both" autocomplete="off" ', $str_pos, 0 );
}
return $content;
}
Related Posts:
- Contact form 7 select box different value-text than content-text in option [closed]
- Contact Form 7 plugin refreshing page on submit [closed]
- Contact Form 7 “non-selectable” options in a drop down [closed]
- How can I implement radio buttons with icons in Contact form 7?
- Hide button after form submit and save state to localstorage
- get/show Last ID
- How to get current post ID in Contact Form 7 wpcf7_before_send_mail hook action
- Let readers suggest edits from the frontend
- Where should my plugin POST to?
- Multi step form, custom plugin
- shortcode doesn’t work
- Template plugin for blog posts? [closed]
- Plugin form unable to process
- WordPress Custom Application form
- Datepicker not supporting timepicker
- add function to saving change on Options Pages
- Is there any good tutorial to write custom login, registration and password recovery forms? [closed]
- WordPress plugin form not saving data
- jQuery Plugin to use WordPress functions in AJAX request
- Add custom variable in Contact Form 7 mail body
- Add form fields dynamically on button click
- How to trigger $_GET request within admin plugin page?
- Retrieving a Value from a wp-database
- Custom CSS for plugin form
- Form doesn’t submit on second submit call
- WP plugins for building a database?
- Image upload and other options in the same plugin settings form?
- When using Simple Fields plugin, how do I pull the information out of the database to display on a page?
- Creating an online questionnaire form – by Importing the questions from a spreadsheet?
- Can I use custom CSS and js plugin to put JavaScript in to validate my forms
- Using a custom plugin to capture input data via Ajax and PHP
- Getting value from dymanic text variable into Contact Form 7
- auto populate list of questions if user select a category xyz
- WordPress WPforms customization
- Adapt PHP form action for WordPress?
- How to insert HTML/JavaScript form into WordPress page? [closed]
- How do I make a child theme I made POST through a 3rd party plugin?
- How to fetch form data and show it to my page?
- Plugin to create forms using HTML [closed]
- Submit custom form from post content and execute in plugin
- Char limit on custom blog-post form? [closed]
- easy steps to make front end form without plugin
- Form that generates an ID for the customer
- Editing a text file from plugin menu
- Contact Form 7 – Form name blank [closed]
- WordPress contact form 7 to show the form dropdown menus as like [closed]
- Ajax Plugin Not Echoing Response
- Plugin that will output submitted form data for user? [closed]
- How to handle forms from sidebar widgets – Processing $_POST variables using get_field_name()
- How do I add the same contact form to multiple wordpress sites and capture the response in one place or database?
- coding a WordPress AJAX Form using PHP to check if User is Logged Out and Show error
- Gravity Forms returns to odd position
- Storing The Data Collected by Ninja Forms into Another (custom) Database [closed]
- WordPress Multi-Step Product Search
- add_meta_box creating default form field types
- Form Plugin for Api Requests which is used via Shortcode
- Echo out element to another page.
- Storing Form data in a different database
- Using AJAX to run SQL statement and populate dropdown
- In wordpress how to sent different email separetly when i click on different email ids [closed]
- How to append new form elements in “Add New” form of Users in WordPress admin panel?
- value not set in contact form 7 plugin of wordpress [closed]
- Looking for a simple checkout plugin [closed]
- Redirect plugin after form submit or show errors
- Linking form to user meta fields
- Contact Form 7 is not redirecting the “Thank-You” page with the removal of CSS and JS of plugins
- get wpforms ID value from ACF text field
- WordPress – send digital product with custom email
- How to create a form where you can select multiple recipients, based on a list of website users?
- WordPress search input in database, to edit information via form and update the database
- Push Contact form 7 variable to front end after submission
- WPForms Custom Redirect not working
- Contact Form 7 – Make a selection unavailable after a number of bookings
- Meta Key array building with multiple input values from fields
- Plugin to manage form submissions on admin panel
- Could someone maybe point me in the direction of a decent tutorial on how to create a wordpress plugin that is compatible with another plugin please?
- Page takes on two different formats
- Is there a function to search for a wildcard value when calling a shortcode?
- Create user assessment and use results in sql query
- Saving custom form fields
- Contact Form 7: custom validation [closed]
- Adding a Filter to Sidbar Login Plugin to Change Login Button Lable
- Create plugin with form in post and submit it to specific form
- Retrieving old forms in Contact Form 7 [closed]
- Link Forms on WordPress
- Capturing POST data
- Undefined variable _POST
- How to prevent page load on form submission
- Integrate Mailchimp to a Contact Form 7 contact form [closed]
- How to develop an extension for a simple form post and post back? [closed]
- How put a file when the email is sent to user contact form 7
- How to do Conact form 7 name field validation? [closed]
- Plugin Beauty Contact Popup Form with while loop
- Is it possible to set different payment gateway on each Gravity Forms form? [closed]
- Contact form 7 – How to send mail to two different E-mail Address [closed]
- prevent contact form 7 from submission on certain condition
- how to show selected options drop down menu values in attributes field in after saving post.php
- Redirecting to page on form submit – Revue plugin
- WP Donation Form with custom payment API
- How can I add a zip code service availability checker in WordPress without Woocommerce? [closed]