Skip to main content
Participant
January 15, 2023
Question

Create A Button To Clear All Fields On A Form

  • January 15, 2023
  • 3 replies
  • 1234 views

I need to create a button that will automatically reset all fields to their initial state (i.e., clear all number, text, date and checkboxes, and return dropdowns to their default selections).

 

Any help would be greatly appreciated.

This topic has been closed for replies.

3 replies

JR Boulay
Community Expert
Community Expert
January 15, 2023

Answer in image.

 

Acrobate du PDF, InDesigner et Photoshopographe
try67
Community Expert
Community Expert
January 15, 2023

The problem with doing it like that is if you add fields, or rename some existing ones, after you add this command, it doesn't apply to those new/edited fields.

try67
Community Expert
Community Expert
January 15, 2023

Have it execute this JS code:

this.resetForm();

Bernd Alheit
Community Expert
Community Expert
January 15, 2023