"This input should not be empty" option, on dropdowns prevents, alert from showing

I can’t seem to find any solution to this.
So, I have a form with multiple dropdowns and when I select the option “this input should not be empty” on the dropdown it prevents the workflow to trigger the alert. As soon as I remove the option the workflow start working.
I tried both checking the “dropdown isn’t valid” or the “dropdown’s value is empty” after a button is clicked and both are not working if the option is on.
Can anybody help me with this?

It’s kinda weird and frustrating.

1 Like

Hi there, @dariogalesi… if I understand your post correctly, it sounds like things are working as they should. When you check the This input should not be empty box for an input element, any workflow that includes the element won’t run if the input is empty. If you want to show an alert when a dropdown is empty, put the alert action in a workflow event that says when a button is clicked and the dropdown’s value is empty.

event

Hope this helps.

Best…
Mike

I followed this path to do things but as soon as I don’t check the This input should not be empty box the dropdown has an additional choice empty value.

To be clearer:

-this is with the dropdown with the option not checked:
dropdown with empty option

-this is the dropdown with the option checked:
dropdown with empty option on

That is also expected behavior. The blank option is there so a user can clear the selection from a dropdown that is allowed to be empty.

Yeah. I get it, so there’s no workaround to check the option and trigger the alert, I should stick with the empty choice if i want an alert

Actually, I thought the workflow I showed would run when the box is checked because the condition is at the event level, but as you already know (and I just found out by testing it), it doesn’t run (which makes sense). Thinking about this one some more…

1 Like

possible workaround:

  • create a custom state to keep the value of the dropdown
  • add workflow for dropdown onchange to update the custom state
  • use the custom state in your workflow to show the alert. Do not use the value of the dropdown.
2 Likes

Yup, what dorilama said. I was heading down the custom state path, too, and what dorilama suggested works like a charm (I just tested it).

2 Likes

Thank you, guys, you made my day.
I’m kinda new to the bubble world.
Could one of you let me see some snapshots for this specific case? I never used custom states and I’m kinda loving the idea of going deep into the power of this platform.

Here are some screenshots from the test I ran. It starts with a custom state I added on the index page (I usually add them at the page level so they are easy to find), and the state’s type matches the dropdown’s type.

Then, when the dropdown’s value is changed, set the custom state to the dropdown’s value.

Finally, add a workflow event that shows the alert when the button is clicked and the custom state is empty.

button-workflow

1 Like

I’m checking it right now!
Will definitely write back if something goes wrong.
Gonna flag it as the solution to help other people with the same question, this is an in depth answer.

1 Like

It worked like a charm! All the dropdowns now can have the option this input should not be empty checked and the alert finally pops up, getting rid of that empty choice as the first option in any dropdown!

Thank you both.

1 Like

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