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
- What is & used for
- How to define form action in JSF?
- Free or affordable OCR and ICR (handwriting recognition) SDK?
- How to reset a form using jQuery with .reset() method
- How to reset a form using jQuery with .reset() method
- What characters are allowed in an email address?
- How to include landing page with form submission?
- How to edit a user profile on the front end?
- How to display user registration form on front-end of the website?
- Plugin Form Submission Best Practice
- How to handle form submission?
- What is an easy way to display a front-end user registration form?
- Check for correct username on custom login form
- Add error message on password protected page
- how to set from address according to the form input email address for wp_mail()?
- How to get current url in contact form 7
- Is wp_nonce_field vulnerable if you know the action name?
- Complex widget form UI – examples and best practices
- How to pass on Google Adwords gclid variable to other pages
- Creating my own Admin Forms in a WordPress CMS?
- using update_user_meta in form to set and get custom meta
- Best way to create multi-step form with data saved to user account for later updating?
- User registration problem in WordPress
- Creating a contact form without a plugin [closed]
- How to submit data from HTML form?
- How to display comments and comment form on custom post type?
- Custom Registration Template/Page
- show image in mail contact form 7 [closed]
- Can I verify nonce which was generated on a different WP site?
- Submitting post to database then redirecting to paypal
- Registration form labels – add asterisk
- Front End Post Submit Form
- Autocomplete for taxonomy input boxes on a front end form
- Sending form data via PHPMailer – How to action PHP script from a form
- How to create and retrieve data from a special registration form?
- Contact form 7 Dynamic text – placeholder on GET field
- how to handle forms in multiple pages?
- set_query_var doesn’t seem to work on init hook
- How to send multipart form data to WordPress endpoint
- need to add attach thumbnail from my form
- Wp_mail Returning False on Server
- recommended practice for form submission
- Custom taxonomy admin description
- Placeholders in Jetpack Contact Form [closed]
- How to update selective options on plugin settings page
- Built-in data validation function for URLs
- $_POST empty on submit (same code, same form submits normally on local server)
- Gravity Forms skip form if already filled out using cookie?
- Loading scripts & styles from a meta box callback function
- Checkbox won’t check when label is clicked
- One comment per user per post
- Looking for a simple approach for handling user $_POST data without AJAX?
- Trying to save and display a wp_editor()
- How to return variables from admin-post.php
- Help with verifying google recaptcha in a custom form
- Nonce actions and names available via open source
- Setting specific image size for specific form upload file field
- Duplicating/Cloning Multiple Form Fields
- How to add multiple checkbox elements to media attachments?
- Using transients to store captchas
- Contact forms going into spam folder
- Get data from dropdown and update page
- Mail Form in a modal box without plugin
- Using the WordPress selected() function
- Performing a POST action on homepage goes to posts page
- Add contact form
- How am I able to get the value out of cookie array when I push a button?
- How do I embed a Javascript form directly into a page?
- 404 on form submit [duplicate]
- How to Process Form Request
- Form Processing
- Reset recaptcha contact form 7 [closed]
- Return to option page after running PHP script
- How to create and work with custom data / tables (i.e., for arbitrary data)?
- Saving checkbox/option list status?
- How to implement a custom password field that redirects to another page upon correct password?
- What is the valid phone number format accepted by contact-form-7 [closed]
- creating form for wp_remote_post
- How to implement post/redirect/get pattern on contact form
- How to know what submit button the user clicked?
- Add Div to Comment Form
- limit characters when posting from form
- Creating a custom multilingual form
- wordpress not displaying my form
- Adding data to an array in usermeta and displaying it in a loop
- RSVP form for Facebook events from a WordPress post?
- Help with forms and nonces
- 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
- Ajax not working properly
- not logged in users can’t submit form
- How to edit custom user meta information front end
- How to redirect new WordPress user to previous page after registering