Autocomplete node-referenced node to add the value if it doesn't exist

rubenhan - February 10, 2009 - 07:03

Hi,

I have this node where the user has to insert the name of the person.
If the person is already inserted before, then the autocomplete function will find that person.

But if that person's name is a new one, instead of having an error in the next page station "found no valid post with that title," I want drupal to automatically insert that name into the database.

Should I hard-code this or is there an easier way that I have missed?

Thank you.

Autocomplete or create nodes

matkeane - February 10, 2009 - 09:47

Hi,

http://drupal.org/project/addnode and http://drupal.org/project/add_n_reference do something like that, or there's an article here - http://www.darrenmothersele.com/content/node-reference-autocomplete-with... - about another similar module. Should give you some coding ideas if they don't do exactly what you need (especially as only the last one has a D6 release!).

 
 

Drupal is a registered trademark of Dries Buytaert.