Disable form submit button not working

In this case, I have my app and within the app I have a module and within that module I have a modal that contains a form.

My goal is to have the submit button of this form disabled until the user enters a value in at least 1 of the fields within the form.

When testing from the module itself, my logic works perfect and the button disables as expected. However when I test this same exact scenario from the app level, the button no longer disables. I even tried removing my logic in the "disable submit" option under "interaction" and just made it true. With this, I would expect that the submit button is always disabled. Again this works when testing within the module itself but once trying the same at the app level, the button is always enabled.


2 Likes

Hi @smorris, thank you for letting us know! :slight_smile:

I could reproduce the issue you encountered and confirm it's a bug, I have filed this to our eng team. Thanks again!

1 Like

Hi @pascual is there a planned release date for this fix?

1 Like

Hi @smorris! The team isn't immediately prioritizing this particular issue, but is planning a more comprehensive update to modules that will include fixes for a variety of bugs that have been identified by the community. I'll update you here as soon as that project nears completion!

1 Like

I ran into this as well. I was able to do this as a workaround:

  1. Change the button type to Default
  2. Add a click handler to control a component and have it submit your form
  3. Set the button's Disabled value to {{ yourForm.invalid }}

It isn't as automatic, but it does seem to work as expected.

2 Likes

Thanks for sharing, @ndeverly! And welcome to the community. :slightly_smiling_face:

1 Like

@ndeverly workaround worked perfectly, thank you!