Please provide an example on writing a widget with autocomplete, pretty much like the generic autocomplete tag widget for taxonomy terms.
What I'd like to see is:

  1. how to key json and handle javascript suggestion selection so that human value is displayed in the textfield but internal id of selected element is stored with entity
  2. how to make another field required depending on the selected element
  3. how to validate selection against allowed values

While the Ajax examples provide lot of information about doing ajax on page forms, the syntax and hooks seem to be different for widget forms. And what is hardly covered anywhere is the key vs. value stuff.
I need to program a compound widget for a custom field with some of dependencies and lookups. Please see a screenshot that illustrates it. An advanced Ajax example would be a helpful resource for that.

CommentFileSizeAuthor
phrase_widget.png13.69 KBmoniuch

Comments

mile23’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

It's minimal maintenance time for the 7.x-1.x branch of Examples. See #2642596: D6, D7 Roadmap for Examples