Show and Hide the Choice field's options value

Hello @Pannir ,

I would be looking for "Dropdown" common field.
With just a piece of JavaScript you can handle the data inside.

Use this - Official Plumsail Documentation - Common field - set data source

fd.field('Field1').widget.dataSource.data(['New option 1', 'New option 2', 'New option 3']);

Do a logic in a function when the number 2 and 3 should and should not appear.

When the dropdown is changed:
Dropdown field is changed - Official Plumsail Documentation

Set the choice field value based on the selection:
Choice field - set value - Official Plumsail Documentation

If you need further assistance, let me know :slight_smile:
(Apply for the newform)

When opening EditForm - you must think about loading the value back to the dropdown. Also in the DispForm, you should only show the Choice field with the value.

Regards
Stepan

1 Like