Add a autocomplete ‘select’ catch to your first autocomplete field. Use this to get the chosen value from the autocomplete. Use an Ajax call to obtain your next autocomplete source based on the selected value and apply the new source to the next autocomplete field.
jQuery( "#cns-make" ).autocomplete({
source: availableTags,
select: function (event, ui) {
var data = new FormData();
var value = ui.item.value;
data.append( 'action', 'your_function' );
data.append( 'varname', value );
jQuery.ajax({
url: ajax_url,
type: 'POST',
data: data,
success: function( response ) { // response is a json string returned from your_function
jQuery( "#cns-category" ).autocomplete( 'option', 'source', response );
}
})
}
});
Related Posts:
- Hide the term description on the term edit page, for a given taxonomy
- Modify Term Update Redirection
- Custom taxonomy only shows 0 in autocomplete for terms and “Choose from the most used tags”
- Front End Post Save Child terms
- Handling AJAX with custom taxonomy custom fields on add
- Recreating the hierarchy of taxonomies for a dropdown form menu?
- How to add autocomplete to custom taxonomy for CPT
- How can I add buttons to a custom column in the taxonomy table?
- get_terms adds slaces to the resualt
- Autogenerate Front End Form Field With jQuery
- Creating a custom search form
- How can I populate a select element with terms from a custom taxonomy and filter post results?
- Simple Filter between multiple taxonomys
- Select multiple categories from CPT to display in LayersWP builder widget
- Use an HTML Element To Filter Taxonomies In WP Search
- Changing input type from text to multi select dropdown – skill taxonomy
- WordPress autocomplete search with taxonomies
- Custom Taxonomy Not Saving in Front End Post
- How to add a dynamic dropdown derived from custom taxonomy
- Gutenberg Block Editor – Create block with dynamic content
- Dropdown (with onChange) with custom taxonomies
- WordPress Multiple Taxonomy Query
- WordPress custom taxonomies new/edit post autocomplete
- get multiple values from $_GET from multiple checkboxes
- Calling Custom Taxonomy Dropdown in Form
- Custom taxonomy auto suggest not working in wordpress admin
- Taxonomy to display form after creation
- Best approach of implementing multi-select/checkboxes for taxonomies?
- How can I get form data with JavaScript/jQuery?
- How to prevent new terms being added to a custom taxonomy?
- How to add images to taxonomies?
- Read-only taxonomy (user can assign term but can’t create or edit existing terms)
- Can you add the visual editor to the description field for custom taxonomies?
- Adding Category/Tag/Taxonomy Support to Images/Media
- Taxonomy menu with post count and multiple parents
- Sort Custom Post Type Archive by Taxonomy Term [duplicate]
- Large taxonomy (2000+ terms), causing WordPress to hang
- Is it possible to have a taxonomy archive that lists taxonomy terms?
- Check if current term is a child of another term
- How to pass posts_per_page and paged params query vars to custom taxonomy archive urls?
- Looping Through Custom Tax Terms and Displaying All Posts For Each
- Exclude Custom Taxonomies
- How to get the top most term (top ancestor) of a custom taxonomy child term?
- Get custom category name from ID
- Set download limit and expiry for WooCommerce downloadable products in specific categories
- Storing data into custom taxonomies VS post custom fields (post meta)
- How do I embed a Javascript form directly into a page?
- How to order a list of taxonomy terms alphabetically?
- get_the_terms issue
- ACF vs Taxonomies
- Reverse traversing taxonomy based on term_id
- ‘wp’ action hook not firing in admin and login?
- Display all posts for taxonomy term across multiple custom post types
- Taxonomies on custom taxonomies
- Get list of taxonomies associated with Subscribers
- How to join result of different taxonomies?
- How to add Post Format Taxonomy Archive page in the menu?
- How to add custom label or texts in featured image
- wp_insert_term created and set for first once only
- Show all taxonomy’s terms’ posts having another taxonomy’s term in common
- Create custom taxonomy and Display in metabox dropdown
- Adding content to custom taxonomy category pages
- Display formatted list of taxonomy terms with last seperator different
- Trying to add taxonomy to get_categories() but it’s not working. How to fix this?
- Proper WP conditional tag to check for existing taxonomies to list out terms with wp_list_categories?
- Display a colour of custom taxonomy on the page
- Filter through custom taxonomy with an array of taxonomy IDs
- Add attribute taxonomy through code don’t appear in admin product page
- save custom term – hook create_term doesn’t work
- How to show post for a particular term of custom taxonomy?
- How to get the term description in a taxonomy term archive query?
- Chaining Taxonomy Queries
- How to list terms by first letter, as in A’s then B’s etc
- Taxonomy hide not working
- Admin only taxonomies?
- How can i find wrong word in search box and replace with correct word
- Create new Taxonomy, add extra fields, register terms AND extra fields values?
- How to change custom categories term links?
- Body class to each level of a hierarchical custom taxonomy
- How to limit custom post category
- How to get a terms and posts associated with another term?
- How to use two same taxonomy in same post differently?
- Display taxonomy term slugs
- Automatically Populate Post Taxonomy Data Based on Post Author Meta Data?
- Get Posts by tag from a custom taxonomy
- How to change taxonomy slug?
- Taxonomy to WordPress Permalinks of custom post type
- Avoiding stripping of HTML in Custom Taxonomy Meta Field
- Advanced AND tax_query in sidebar with 2 taxonomies
- Create WordPress taxonomies based on theme settings
- Alternative for is_taxonomy() to workaround theme’s default sidebar
- Can I use get_term_children to show child terms if they exist and show something else if they don’t?
- I’ve got a function that auto creates taxonomy terms – Can it auto delete them as well?
- Get custom taxonomy value of post and output posts in same taxonomy
- Head Code for Custom Taxonomy
- Adding new terms to custom taxonomy
- List posts grouped by children of a custom taxonomy
- From form submission values – dynamically update CPT “has_archive” slug and custom taxonomy “rewrite” slug value
- How home my code doesn’t display any feature image? Looping through post from a taxonomy and not getting feature images back
- Add taxonomy fields of posts into RSS feed