Could you be more specific on the “when a new term/tag has been added” part? Are you doing it yourself, as in you call the backend through admin-ajax.php and update the front-end accordingly? Including some code or a link to jsFiddle wouldn’t hurt.
There’s a create_term action you can hook into in the back-end. Just put this into functions.php or your plugin code:
function your_create_fn( $term_id, $tt_id, $taxonomy ){
// do your thing here
}
add_action( 'create_term', 'your_create_fn', 10, 3 );
Alternatively, if you’re doing it yourself then you obviously control the entire process, so you know exactly when you’ve successfully added a new term and can return something to the JS function that indicates you need to clear those values.
Related Posts:
- Settings API erases itself?
- Customize reset password form redirect problem
- Adding a different domain to existing WordPress site
- What is the proper way to embed the HTML of an external form such as payflowlink from paypal?
- Reset form on onclick function
- How to define form action in JSF?
- How to display user registration form on front-end of the website?
- Complex widget form UI – examples and best practices
- Creating a contact form without a plugin [closed]
- How to submit data from HTML form?
- Front End Post Submit Form
- Sending form data via PHPMailer – How to action PHP script from a form
- how to handle forms in multiple pages?
- recommended practice for form submission
- Custom taxonomy admin description
- Gravity Forms skip form if already filled out using cookie?
- One comment per user per post
- Trying to save and display a wp_editor()
- Using the WordPress selected() function
- Return to option page after running PHP script
- How to create and work with custom data / tables (i.e., for arbitrary data)?
- Add Div to Comment Form
- Stripe Error: must provide source or customer [closed]
- How to submit form in a PHP file in WordPress?
- CRUD front end for mySQL in WordPress
- How to prevent page from resubmit on refresh when “Cannot modify header information – headers” warning shows
- How to edit custom user meta information front end
- How to redirect new WordPress user to previous page after registering
- Google Map Latitude and Longitude values in form
- How to properly add a custom submenu to the user’s admin menu
- WordPress form to shortcode
- Create Contact7 Form programmatically [closed]
- recaptcha working on local but not on live wordpress sites [closed]
- User input form field value validation ninja forms 3
- Creating a contact form with Laravel frontend
- Using form parameters within a WordPress “Page”
- How to get the value of input hidden html from text editor to custom page template?
- Is there documentation reference for forms in menu and setting pages?
- How do I make a child theme I made POST through a 3rd party plugin?
- Make a form that will send email to all the authors in selected category [closed]
- Can I make Contact Form 7 change over to a new page? [closed]
- How dynamically change wp_mail behaviour, sending html or plain text based on conditions?
- A mandatory agreement form to access another page?
- “operation successful” message
- Creating short code for search form
- textarea field is getting escaped for some unknown reason
- Problem in getting Value through POST method after Login
- Where to add css file that I want my forms to use?
- Downloadable content only for subscribers?
- how to add a custom form in a page
- How to Collect Keyword and Search Engine Data on Webforms?
- Create a registration form with a PayPal checkout fee? [closed]
- free form wordpress
- comment form name and email not working?
- Sort populated GravityForms list alphabetically [closed]
- form action wordpress and php
- Checkboxes in a wordpress form are not showing as checked when selected [closed]
- Radio&Checkbox buttons Contact form 7 not clickable
- WordPress Emails & Contact Forms [closed]
- How to add a placeholder to the protected post password input
- How to change a form end email?
- Simple form validation for custom post type in front end. Not working
- Custom Form not generating URL
- Contact form with Jquery and PHP don’t work
- Making an input field required from WP’s perspective
- Cannot modify header form resubmits data on refresh
- How to use multiple check-box values to work in a function and insert values in database
- Code for front end validation for forms not working
- How to create a custom post-new.php page for plugin , no wp menu
- How do I implement form handling when form is custom HTML?
- how do I hide or encrypt query strings for gravity forms
- Forms cut off when on mobile
- WPAdverts – How to limit form submission 10 per month
- Using an iframe for a form help
- Fatal Error with WP Forms
- Form data being sent to parent directory
- Delete comments function
- WordPress Ajaxifying not working properly
- Form submissions that require users ID# [closed]
- fetch custom post if meta key exist
- Passing form data on submit
- Default URL for category dropdown select option
- How to stopping auto scrolling after submitting the form?
- Preventing form resubmission on contact form plugin
- wp_nonce for Front-End submission form not working
- How to handle dynamic form data with repeating fields?
- Pay before posting (frontend insert post)
- How to send form values from the script in functions.php and not from the form on my website?
- add unique code required to register
- Issue with contact form 7
- Advanced searching form
- Dropdown List Won’t Display Selected Option After Submit / Refresh
- WordPress Custom wp mail template return full template
- How do I register user without being authenticated
- How to add or double field?
- Custom form validation
- How to manage to submit WPForms at our webpage
- Adding default quicktags to textarea
- How can I get lost form data back? [closed]
- Forminator + Hubspot Workflows