Jump to content

Suggestion: Separate keys and values for autocomplete


Xae

Recommended Posts

Posted

The core/global/forms/text.phtml template and \IPS\Helpers\Form\Text should be amended to allow custom keys for the autocomplete datalist. I can think of many instances in which one would want to use the option text for presentational purposes; for instance, searching through nodes by name but saving the ID in the database.

A simple way to accomplish it would be to add another variable to the helper's autocomplete options named something akin to keysAsValues and then an if clause in text.phtml which checks for it and outputs both $k and $v rather than just the latter.

Either that, or there's a better way of using separate keys and values which I haven't come across yet.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...