Form with the reset button
Hello everyone,
I made a new form by using the forms inside the content, which is on the top in the sitefinity page.
However, I want to add a reset button in the form. The reset button is used to clear the data in the text box and drop-down list.
I have few questions to ask:
1)Can I build this button in the sitefinity Page only? not in the thunder.
2), If no, how can I add this button in the form by thunder, since I cannot find any templates about the form in the Sitefinity Explorer?
3)Can someone give me some codes if it is necessary to build a new widget in thunder?
regards
wing
Hello Wing,
To create a "Reset" button you'll need to create custom form field control. This could be done easily with Sitefinity Thunder. To see how, please view this video:
Creating Custom Form Field Controls with Sitefinity Thunder
In order to reset the form you'll need to use some JavaScript. As an example you could create the button in the .ascx file as follows:
<
asp:Button
ID
=
"ResetBtn"
runat
=
"server"
OnClientClick
=
"this.form.reset();return false;"
Text
=
"Reset"
/>