Extensions UI fields show and hide

Some additional suggestions:

  • Show/Hide static display type. Useful when you want to present specific info for a dropdown selection.

  • UI required boolean should take into account if the field is hidden or not. Right now if you have a selection that hides a required input you won’t be able to save the action as it will keep telling you that a field is required.

1 Like

you can actually already specify a “optional” required. So that the required is only checked if other field has specific value:

{ name: 'oauth_client_id', optionName: 'client_id', title: 'Client Id', 
        type: 'text',   allowPaste: true,
	required: true, requiredField: 'oauth_type', requiredFieldValue: 'client',
	serverDataBindings: true, defaultValue: '' },

this means require this field only if the other field called oauth_type has the value ‘client’
Usually you will choose the other field here that toggles the show/hide

Oh. That’s perfect.
It should probably be added to the docs.
Thanks!

Edit: Can I use an array for requiredFieldValue? Require this field only when this field has value 1 OR value2? This is actually my use case for Nano ID. Alphabet field should only be required when a dropdown is value1 or value2

not yet - but will add support for it

1 Like

This is improved in Wappler 3.4.2

1 Like

This topic was automatically closed after 27 hours. New replies are no longer allowed.