Jump to content
You're invited! Join our 4.6 Live Event on ZOOM 6/24 ×

Community

KeyValue Form Helper - Define field types.


Recommended Posts

Yes, I am fully aware I can do this by extending the KeyValue form helper class. Every, single, time I want to use something not a text input for the key or value. Can we pass this as an option like 'keyFieldType' and 'valueFieldType', defaulting to Text instead, and pass the field type specific options through to them with something like 'keyFieldOptions' and 'valueFieldOptions' please?

For reference, I often use this field with the Stack field type, so such a change would need supported with this field type as well to be of value.

For example:

$form->add( new \IPS\Helpers\Form\Stack( 'my_setting', $values, true,
    [ 'stackFieldType' => 'KeyValue', 'keyFieldType' => 'Url', 'valueFieldType' => 'YesNo' ] ) );

 

Edited by Marcher Technologies
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

We use technologies, such as cookies, to customise content and advertising, to provide social media features and to analyse traffic to the site. We also share information about your use of our site with our trusted social media, advertising and analytics partners. See more about cookies and our Privacy Policy