Empty a field when clicking submit in a stateless form.
I am trying to null a field on the submission of a stateless form with an alert but it's not working.
if(input.Time_Slot == null)
{
alert "Date slot cannot be empty";
input.Type = null;
input.num = null;
}
Its working on user input of a field.
if(input.Type == "none")
{
alert "Date slot cannot be empty";
input.Type = null;
input.num = null;
input.Time_Slot = null;
}
I also have some fields In other forms that need to be null on submit.