The CF7 plugin does not give you access to the HTML markup formatting function of the field tags. So you need to capture the JavaScript event fired when the field is changed. To do this you can tag a script at the end of your form,
<label>[text* name id:name]</label>
<label>[text* surname id:surname]</label>
[submit]
<script>
(function($){
'use strict';
$(document).ready( function(){
$('form.wpcf7-form :input').change(function(e){
var $field = $(e.target);
switch($field.attr('name')){
case 'name': //text field name was changed.
//do something.
break;
case 'surname': //text field surname was changed.
//do something.
break;
}
})
})
})(jQuery)
</script>
Related Posts:
- How to replace a javascript select box onchange event to a form submit action?
- Close modal window after form submit [closed]
- How to change number field to text field using JS
- Can’t bind to ‘ngModel’ since it isn’t a known property of ‘input’
- Reactjs – Form input validation
- Angular: mat-form-field must contain a MatFormFieldControl
- No value accessor for form control
- Send POST data using XMLHttpRequest
- Setting onSubmit in React.js
- jQuery AJAX submit form
- How to reset a form using jQuery with .reset() method
- JavaScript post request like a form submit
- Phone mask with jQuery and Masked Input Plugin
- How to create a HTML Cancel button that redirects to a URL
- What does ngf-select do and why is it needed for form validation?
- JavaScript post request like a form submit
- How can I get form data with JavaScript/jQuery?
- {“error”: “Please use POST request”} – alternative solution to submitting a form
- FormData append not working
- JavaScript code to stop form submission
- how to write javascript code inside php
- What’s a Good Javascript Time Picker?
- ngular is automatically adding ‘ng-invalid’ class on ‘required’ fields
- Add custom form to theme
- Contact Form 7 – Give each checkbox a class?
- How do I embed a Javascript form directly into a page?
- Conditional fields in contact form 7 not working
- How to load javascript file on homepage in WordPress in order?
- How can I get my Calculate Contact Form 7 field to update with jQuery? [closed]
- Contact Form 7 – Uncaught TypeError: wpcf7.initForm is not a function [closed]
- contact form 7 repeatable fields calculations [closed]
- Use onfocus event in Contact Form 7
- Change/Replace keyboard character on keypress while writing new post
- How do you filter the list of states when country is selected? [closed]
- Uncaught ReferenceError: jQuery is not defined – although jQuery is loaded [closed]
- Why does a on Comment edit page submit the page?
- Add captcha validation to my custom form for Frontend posting
- How to add a onclick attribute to a list of checkboxes?
- How to display contact form 7 form in vanilla js without jquery in frontend
- Form will not popup, when clicking on the link to the form
- How to show cities according to the state in Form using Javascript? [closed]
- Contact Form 7 Conditional redirect
- Can’t Listen to KeyDown in TInyMCE Iframe (jQuery) and Pass it to Parent HTML FORM
- Error handling for wpdb error – displaying an error message to the user
- contact form 7 javascript and wpcf7_before_send_mail action
- Contact form 7 hide and show fields depending up on the condition [closed]
- Securing Contact Form 7 [closed]
- CCF7 Field numbuer prefilled after Click event
- Sending GravityForms to custom HTML
- How to adjust the selector used in JS to target only the one that was clicked on?
- WordPress 4.2 mce-views migration guide?
- Receive “menu-toogle” event from section menu in customizer
- Adding javascript blocks to a single file and adding it to the header
- None of the JavaScript works when using wp_editor
- JS files landing on page but not working, using childtheme of twentyeleven
- WordPress 4.1 crashes loading of ArcGIS Javascript API
- jQuery + more won’t load in header
- Simple email input store in database
- How to modify a class in load-scripts.js ?
- How do I convince this button to do something when it is clicked?
- Convert javascript running xml files to wordpress platform
- WOW.js Script Tag Initialization Header/Footer
- Remove WordPress default registration client side validation?
- How to integrate a different (JavaScript) editor in WordPress?
- JS enqueue path (localhost)
- Load and execute javascript from body
- Why can’t I load JS script in a plugin?
- Page template dynamic links based on browser size
- javascript errors on mobile browser, not on desktop
- Passing input value into name of input
- Trigger a function during onload
- Loaded JavaScript file not showing [duplicate]
- Are you sure popup on Contact Form 7 [closed]
- WordPress Theme – jQuery JavaScript Library Issue
- I keep getting Javascript error messages
- How to add additional JavaScript code [duplicate]
- custom page url slug needs illegal ?id=1 for javascript
- Script loaders vs wp_enqueue_script
- PHP or JS for header image rotator?
- convertEntities() used before it is defined
- Block pattern conflict with custom block
- Use one javascript variable into another javascript file
- JavaScript: TypeError: xyz is not a function after upgrading WordPress
- How do I find stylesheet & javascript handles? [duplicate]
- Bad Request when adding new post via ajax form
- Issue with contact form 7
- JavaScript errors
- JavaScript file successfully registered but does not render correctly
- Don’t understand how to link Javascript files in WordPress
- How could I add load more posts to my theme? [closed]
- Disable PAGESPEED SCRIPT INJECTION to IMAGE in theme files [closed]
- How to Create a Repeatable Meta Box
- How to keep close a sub-menu under homepage? [closed]
- Custom JS doesn’t work after 4.9.9 update [closed]
- Send foreach $_post method to contact form 7 [closed]
- How to implement custom URL handler to access JS modal content? [closed]
- Loading 2 Different Version of JS files [closed]
- List unused javascript for easy removal
- Embed Kajabi into WP
- Include Facebook Javascript SDK In WordPress