Button not triggering form submit workflow

I have a button that, for CSS reasons, I left outside the form container. To link it to the form, I assigned an ID to the form container and added the form attribute to the button, assigning the form’s ID as its value. When I click the button, it doesn’t run the form’s workflow. I have this same button and form format in other places and they work normally, but it’s not working here. One thing I considered was that, since this form has a “page” system, clicking the button hides the fields on the first page and shows those on the second. Perhaps the hidden fields are causing this problem, but as I said before, I have exactly this in other parts of my application and it works normally.

Hi Pedro :waving_hand:

interesting approach, so you’re saying that the fact that this form is a “multi step” one is affecting your button from calling the submit workflow?

But what is weird is that you say you have the exact same set up in other pages and it’s working. :thinking:

If possible I wouldn’t mess with the form container, I would try to work with the button inside the form itself.

As for multi step forms I would try to use conditional rendering instead of display: none.

Why are you using your button outside your form?

1 Like

Hi, The problem was that I was using display instead of condition to show and hide elements. Changing that fixed the issue and it’s working now, Thanks

2 Likes