I have created a simple frontend form to allow users to submit posts – similar to the tutorial here – http://voodoopress.com/ . I also have a couple of custom taxonomies which i have as text input boxes on my form. This is all working but i was wondering if there is anyway i can have all the fields including Post Title and the taxonomies to auto suggest existing values?
Below are the methods you can try. The first solution is probably the best. Try others if the first one doesn’t work. Senior developers aren’t just copying/pasting – they read the methods carefully & apply them wisely to each case.
Ok not sure if this is the best method to use but it worked for me. I used a combition of jquery-ui-autocomplete – and the JSON API plugin
First download the required js files from the link above. I used jqueri-ui from the Google library
Install and activate JSON API plugin
Next step is to get this working with custom taxonomies!
I’ve spent a bit digging around on this and I think I’ve found your solution! It seems that
name__like parameter is going to be the way to go.
name__like‘s query is as follows (from line 1304 of
$wpdb->prepare( " AND t.name LIKE %s", $name__like . '%' );. It will take whatever you give it as the
name__like parameter, and add an SQL wildcard,
%, to it. This means that it will look for everything that STARTS with what you feed it.