Setting a value using Forms API on Autocomplete Deluxe fields

Created on 23 September 2012, over 12 years ago
Updated 15 September 2024, 3 months ago

I'm trying to set up a function to pull terms from a referenced node and pre-fill the fields on a new node. I can get everything working right up to the point where I need to insert the collected values back in and I just can't figure out how to do it.

To explain my scenario better, I have a Node Reference field. When a user enters a value in there and presses the pre-fill button I created, a function fires to collect the terms that have been saved on the referenced node/s.

All the fields are Taxonomy terms and use the Autocomplete deluxe widget.

I tried using the default http://api.drupal.org/api/drupal/includes%21form.inc/function/form_set_v... but just couldn't get it to play. Should it work?

So how, from template.php or a custom module, do you programatically add new terms to autocomplete deluxe fields?

💬 Support request
Status

Closed: outdated

Component

Code (miscellaneous)

Created by

🇦🇺Australia marblegravy

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024