How to use a cancel button in a form

Hi community
I have in my form some required fields which have to be filled before clicking on buttons, however I want to have another button “Cancel” to cancel everything even if the fields are not filled. do you know how to disable this required Fields for the “Cancel” button?

2 Likes

Hey @Ayb_Ben,

Do you want to clear the field values after clicking cancel ?

Awaiting your response, Thanks :slight_smile:

1 Like

Hi Nithin
No I want a button to close and exit from the form without filling the required fields.
However I will be also interested in this Idea where I can clear Field values and reset the data on the form. (Like ‘Reset’ Button)

1 Like

Hey @Ayb_Ben,

Just use a button and do nothing for it in DO Block of form.

This may be the solution for your scenario.

Thanks :slight_smile:

But I have a Switch in “Do” Block and I want that the Cancel Button exits from the Form even when the Required Fields are empty.
Because if some fields are required, The Cancel button can’t exit from the form, the fields will be highlighted in red after clicking on the cancel button.

1 Like

Thats perfectly fine, I meant you shouldn’t be having logic only for the respective button.

Thanks :slight_smile:

Please see below:
I want to exit from the Form when the button “Cancel” is clicked, even when the required Fields are empty .

1 Like

What is the forms package version are you using please ?

I’m making a demo for you, will use the same package version

2 Likes

Hi Nithin
I’m using the last version. 1.1.8
Thank you some much I appreciate.

Best regards,
Ayyoub

1 Like

Hi
Were you able to build the demo or something?

1 Like

Sorry for the delay @Ayb_Ben, I was on my travel…
Hope you don’t mind :slight_smile:

Could you please try the below workaround,

FormCancel.zip (2.8 KB)

Thanks :+1:

3 Likes

Hi Nithin
It was a good solution thank you a lot.
Best regards,
Ayyoub

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.