Stop form submit on return key press

I'm just trying to disable the submit on return action on a form component.

When users press Return it submits the form, I want to disable this. I only want the form to submit when submit is pressed.

I see the option "disable submit" which suggests you can do this and specifically mentions on hover stopping the return key functionality, but when I set it to True it also disables the button.

Hi @rjb2000,

I reviewed your issue, and as you mentioned, when you set "Disable submit" to true, it also disables the submit button. To work around this, you can change the button type from Submit to Default. Then, instead of relying on the default form submission (triggered by pressing Enter/Return), you can use an event handler on the button to explicitly submit the form when it’s clicked.

You can change the button type here:

Feel free to ask if you need further assistance or have additional questions. We're here to help!

1 Like

Thanks for the help!

1 Like