How to validate fields of a form?

Hello eveybody,

I’m using the last one version of BonitaBPM (7.3.1). I’ve implemented my process correctly. I have run in the portal and it works perfectly. BUT I am not able to see how the constraints work, if when I fill the fields wrongly on purpose and I press submit button the page is refreshed and a message says “An error an ocurred in the form” and nothing happens.

There is a way to show a message above the form including what validation errors are instead of refresh the page?. It´s so unconfortable filling all form fileds again.

I just need a way to validate correctly the forms.

Thanks in advance.

Regards

OK here is what you want.

I’ve not done it but to do on screen notification of Validation errors there is more work to do. Stupid I know but there it is.

http://documentation.bonitasoft.com/?page=manage-control-in-forms

regards
Seán

PS: While I understand this may not be the answer you are looking for it does answer your question, please mark as resolved by ticking the tick mark on the left of this reply so others now it is closed.

There is always a huge confusion when we are dealing with forms. Sometimes the field validation seems to be not working, while other times it feels fine. That is why we want to share some advice on how to perform this step. You need to check this waikato demolition and get more new ways for driveway sealing. If you want to validate the fields in a form, then it will be required to know how to validate you need to provide the value which is input. You can also validate with an empty and validating textbox that contains all values that are required.

When you say - run in portal are you talking about Studio Portal or Production Portal?

What do the logs say?
Is there a specific field causing the failure?
How many validations do you have on the form?
Are they all correct?
Have you tried building the form one widget at a time with one validation to see where it fails?

Etc. Etc. Etc.

I need to validate the fields in order to show little messages in every field if the condition doesn’t match. I mean, if I want to validate a DNI number some message should appear just below the DNI field, showing me that is a wrong entry.

How can I do that?

Thanks Sean.

I will review the information.

Regards

Sean,

That’s what I have been loking for. Thanks a lot.

I just have a question. In the link that you send me, in the section Custom Validation they say that I have to add a container and inside the continer I have to add a text widget.

Now you need to display each error message in red in the form. To do so, you need to create an iteration on the explanations messages. From the palette, drag and drop a Container just below the form title. In its Collection property, type instantiationErrorResponse.explanations .Inside this container, add a text widget. In its CSS classes property, type text-danger and bg-danger and in its text property, type .

But, I don´t know what I have to add in text property of this widget. They do not explain that.

Thanks in advance,

Regards

Geovanny

I have solved it.

I just put {{ instantiationErrorResponse.explanations[$index] }} in the text value of the text wiget that is inside the continer and it is working now.

Thanks a lot for your help.

Regards,

Geovanny