How to reset/clear value of Input component in UI Builder

harshitjamw
Tera Contributor

Hi Team,


I’ve implemented a modal on the record form that includes an input field, a checkbox, and two footer buttons: Cancel and Create Interaction.

This modal is triggered by a declarative action (Create Interaction). When I enter details in the input field and click Create Interaction, it successfully creates the interaction. However, the issue is that when the modal reopens, the previously entered text in the input field is not cleared.

Could you please suggest how I can ensure the input field is cleared each time the modal opens?

Let me know if you’d like a more technical or informal version.
2 REPLIES 2

Long Duong
Kilo Sage

hello @harshitjamw ,

 

Have you bind the input with the client state? Can you please provide the screenshot about your configuration for further troubleshooting? 

 

Thank You,

Long Duong 

IronPotato
Mega Sage

Hi @harshitjamw ,

make sure that your inputs are getting data from client state and also that you are updating the state whenever user is typing or copy pasting the text. Once they hit create just clear these values back to the default state.

 

Hit "Helpful" if this helped :).