By digemall on
Hi,
I'm trying to set a n autocomplete field in my module to allow selection of one node from a list of available nodes.
I've already added the form field, created the the menu entry and linked to the callback function.
When I type a text in the field the callback function was correctly called... so basically everything works fine.
What I miss is how to pass more parameters to the callback function.
Actually, I need to know the values of the other fields in the form to filter correctly the autocomplete query, but callback function seems to receive only the typed string as parameter...
Is there a way to do that ?
Comments
Bump !
Bump !
There isn't a way to do this
There isn't a way to do this using the built in Drupal auto-complete function, as it is built to only view the data in the actual field you are typing in, and cannot see other fields in the page. To do this you would have to build your own auto-complete function from scratch, and add the javascript to the page yourself to get it to work.
Contact me to contract me for D7 -> D10/11 migrations.
Ok thanks for the help :)
Ok thanks for the help :)