How to use success and failure alerts?

Hi,

This is pretty basic, but I’m trying to wrap my head around alerts and need some help with the following situation. I want to have a success alert when a user Input Password field is valid and a button is clicked. But then, I also want to have an error alert if the user leaves that Input Password field blank and still tries to click the button. Do I have to add two different alert elements to my page (one for success, one for failure)? And if so, how do I set the workflow so that the error alert shows only when the Input Password field is blank?

Additionally, I added two text elements on the page as a means of checking the value of the Input password field. These elements are set to Show Input Password’s value and ‘Input Password is valid’. Surprisingly even when the page loads, these two text elements show me the following result. Input Password’s value is blank but Input Password’s validity is ‘yes’, which I find strange because at page load even when the Password field isn’t in focus yet and has nothing entered (just a placeholder that says ‘Password’) Bubble seems to be treating the password field as valid even though it has no value. I have the Input Password field’s ‘This input should not be empty’ checked.

Any help would be appreciated.

Thanks.

Hello @SeanB

I prepared a simple example. I set two alarms, but of course it’s up to you. I assumed you required a 5 digit password, you can require more or less of it here.

Clicking the button triggers a Custom Event and the type of thing field of this Custom event is “yes / no”.

image

image

Check out the trigger action please.

image

It will return yes if the number of characters of the input password is greater than or equal to 5, otherwise it will return no.

I have edited the workflows according to the returned answer.

Preview
Editor

Hope it helps.

If you want to learn more, you can take a look here.
https://nocodebible.io

Best,
Eren

1 Like

Thank you @eren for the detailed response. I will give this a shot and let you know how it turns out. Thanks so much once again for the detailed references and link to a preview editor. I really appreciate it.

1 Like

Hi @eren, quick question about this. I’m trying to replicate your example. Can you help clarify what action this is please.

Is this a “Show Element” action or a “Show alert” action? Apologies, I think you’ve renamed the action to “AirAlert - Standard”, so I can’t tell which action this is.

image

Thanks.

Sorry @SeanB,

I’ve been using that plugin for so long that it felt like everybody knows.

Standard alert can also be used. If you still want to use this alert, download the plugin and check out the Plugins actions.

Best,
Eren

Thank you. I’ll give it a try now.

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