With the hook recently introduced we are able to use specialised trigger value widgets.
Currently there are only simple textfields as defaults and for some fields select lists available.
But if we would add some keys in the hook, we could provide the possibility to use a custom trigger value widget for each field widget.

To achieve this, we have to add the following keys:

  • trigger_value_widget: A callback used to create the trigger value widget
  • trigger_value_widget_multiple: A boolean indicating whether the trigger value widget is able to handle multiple values at once (e.g. select lists are able to, but textfields aren't)
  • trigger_value_widget_submit: Basically creates a string out of the value of the widget created by trigger_value_widget, that can be written to the database
  • trigger_value_decode: Decodes the trigger value in the database to a string or array of strings that can be used in a #states array
CommentFileSizeAuthor
#4 trigger_value_widget-2341789-4.patch14.15 KBTobias Xy
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Tobias Xy’s picture

Issue summary: View changes
Tobias Xy’s picture

Status: Active » Closed (duplicate)

I will do that together with #2276393: Rewrite of admin UI.

Tobias Xy’s picture

Status: Closed (duplicate) » Active

Because I can't release 2.1 until this one here is done, I will do it separately again. :D

Tobias Xy’s picture

Status: Active » Needs review
FileSize
14.15 KB

Patch.

  • Tobias Xy committed 1c67d2e on 7.x-2.x
    Issue #2341789: Allow custom trigger value widgets
    
Tobias Xy’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.