Show alert if the input field value is not correct

How can I show a message (alert), if an input field’s value does not meet a condition. For example a city name needs to be unique over all cities, and I want to tell the user that he entered a duplicate city name.

I would like to have this while leaving the input field. Not after a button was clicked…

Thanks
Willem

You can do it on the work flow trigger “data has changed”?

@willem I put together a way to do this in the forum app, press preview to try it out. Type cities that are in the list and ones that are not.

@NigelG, there is a small lag between typing and the state setting. any idea how to reduce that lag to zero?

2 Likes

Hi Ben,

I looked at your example, thanks for sharing.
You disable the Save when the city is taken.

I Would like to show an alert, to give a message to the user: City is taken.
I already have the alert. I also see how to create the logic to check the existence of of a city. But I don’t see you the raise the alert.

@NigelG: I don’t see a workflow trigger “data has changed”. Would expect it on the input field somewhere…

I managed to do this with the workflow
When input’s field value is changed and search fro cities count > 0

Great.

Thanks for the help.

Willem

no problem!

Willem,

You can also set a condition for a text element. Have a look at the forum app link shared by Ben. I added a text element for you with a condition.