How do I reset form widgets on change of dropdown value

I have a form with multiple fields and while selecting a dropdown value some data will be fetched from db and shown to other widgets . when deselecting the option the widgets filled with data should be changed to default value state. I tried by calling resetwidget() for each and every field but did not work.

  1. Before selecting fee term

2.Here while select fee term the data are populating to the fields

3.After deselecting the fee term some widget like number field only are got reset.

@Ginjo If you are using a form or a container, you can reset all the widgets at once by setting the children to reset too. Could you try and see if that helps?


@dancia I am using form and need to be reset a part of it not fully. So I grouped the widgets to be reset inside a container within the form itself and tried to reset with container name. But the select widgets are not resets its value .

Hey @Ginjo! Can you please create a toy app that demonstrates the issue & share it with us? It’ll help us debug the issue faster. You can share exported app here.

Ok sure I will share the dummy app soon

@pranav I have sent the sample app to