How to restore the initial state of the input element ?

i use wix-data API save() to save data into database. I do not use dataset, so not element connect to the input elements. The input elements used are datepicker and dropdown. I found that after finishing storing data. The input elements did not restore showing the initial text. Hope to restore the initial text. How to solve this problem? Thank you!
This is the initial state of input elements

This is the state of input elements after saving data into database, I want it restore the initial state of input elements.

Hi,

In order to set the input value to the initial state, you can write some code that sets the value of the input element to null after the data has been submitted to the database. You can find more information on setting the value of a dropdown and the date picker element here .

Best regards,
Edward | Corvid Team

Thank you ! your idea is worked good. But there is another problem. The elements frame is red. Is there any way to make them not red?

@laizhihong Awesome! Try using the resetValidityIndication( ) function for the elements as described here: https://www.wix.com/corvid/reference/$w/dropdown/resetvalidityindication

Yes, $w(“#…”).resetValidityIndication() can make the red box disappear. I found that $w(“#…”).updateValidityIndication() can displaye a red box. In addition, add useing $w(“#…”).valid, a complete input detection can be formed. Once the input is found to be wrong. Just use the red box to remind.