How to validate fields of a form?

1
0
-1

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

Comments

Submitted by Sean McP on Tue, 09/13/2016 - 02:55

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.

Submitted by geovanny.campoverde on Tue, 09/13/2016 - 16:35

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?

1 answer

1
0
-1
This one is the BEST answer!

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.

Comments

Submitted by geovanny.campoverde on Wed, 09/14/2016 - 15:21

Thanks Sean.

I will review the information.

Regards

Submitted by geovanny.campoverde on Wed, 09/14/2016 - 18:00

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

Submitted by geovanny.campoverde on Wed, 09/14/2016 - 23:57

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

Notifications