"Reset relevant inputs" makes input invalid (when submitting with enter/return)

When I have an input and a button, I like how I can press enter/return (when I’m still in the input field) to submit the button.

The only downside is when I “reset inputs” at the end of the workflow, my input now “isn’t valid” (when I click the button to run the workflow, this isn’t an issue, but it is when I press enter/return).

I made a video to show you: http://philstorage.s3.amazonaws.com/input-is-not-valid.mp4 (the first time, I click the button… second time, I press enter/return… third time, I show step-by-step just so you can see my workflow).

I can kind of understand why this is happening, but it seems wrong. Anything to be done? Thanks!

Update: Is this a bug @emmanuel?

Hey @philnauta I did a quick sample and can’t replicate this – my input box does not switch to invalid when hitting enter. Have you confirmed that the input shows as invalid in the debugger?

Thanks @mebeingken, yes, I’ve confirmed in the debugger. It’s because I set the input to “The input should not be empty”. But the workflow actions that require the input are all before the “reset relevant inputs” action, so in my view, the input shouldn’t be marked invalid at that point - after the workflow.

I’ve been able to get around this by putting a 1-second delay before I reset the inputs, but that just makes the application feel slower. I know instead of using “The input should not be empty”, I could put a conditional on the button, but then I wonder what the point is of “The input should not be empty”?

Editor: https://bubble.io/page?type=page&name=reset_inputs_invalid&id=forumapp3&tab=tabs-3
Preview: https://forumapp3.bubbleapps.io/version-test/reset_inputs_invalid?debug_mode=true

Ahh…ya, that doesn’t seem right. Perhaps there is a use case, where this makes sense.

I suppose a work-around is to remove the formatting that is based on invalid, and do your own validation of the value. I actually did something like that for password creation using the new plugin from our buddies at AirDev: [New plugin] Instant Text. I use a standard text box for the user to create their password, and pipe it over to the instant text element. From there, I use some regex extracts to determine in real when each part of the password policy has been met. Depending on you validation needs, maybe that would help?

Thanks again for the reply, ya, in this case it’s easy enough to put a condition on the button, but that doesn’t work as well when there are many input fields. Anyway, thanks for your insights :slight_smile:

This topic was automatically closed after 70 days. New replies are no longer allowed.