Just playing around with Wordpress / Contact Form 7
.
Is it possible to add custom javascript function on successful email send event?
相关问题
- Display product ACF field value in Woocommerce tra
- Adding a custom button after add to cart button in
- How to add a “active” class to a carousel first el
- Setting custom order statuses as valid for payment
- change the font size in tag cloud
相关文章
- wordpress新增页面如何个性化设置
- select query in wordpress
- Get WooCommerce featured products in a WP_Query
- Woocommerce update shipping methods in checkout vi
- Change order status just after payment in WooComme
- Publishing or uploading failed. Error message: “Th
- Facebook Login With WP JWT Auth
- Wordpress development process
Just a quick note that on_sent_ok is deprecated.
Contact form 7 is now using event listeners, like this;
Then add this to the wp_footer action.
like this;
Write this in additional settings at the bottom of the contact form configuration page:
UPDATE: You can use it to call functions like this:
Or write some code (this one redirects to thank you page):
Contact Form 7 emits a number of Javascript events that bubble up to the document object. In version 4.1 they can be found in contact-form-7/includes/js/scripts.js. If you're using jQuery you can access those events like this:
Example 1:
Example 2: In form script:
Then at the bottom of the admin page under "Additional Settings" put the following:
try this: