119
Views
10
Comments
Solved
Multiple form validation
Question
Application Type
Reactive
Service Studio Version
11.53.35 (Build 61815)

Hi everyone !
I'm feeling a bit dumb for asking this, I think I'm doing soimething wrong.....


Here is the scenario, I have and edit form with some input fields and two lists (addresses and contacts).

Each of those lists is inside a form of their own and has an edit/add button that opens a Container to input values / save them.


What happens is that the form validations are working perfectly for the "parent" edit form but when I try to add a new address/ edit an existing one the validation of the edit address form returns valid as true even when there are some mandatory fields not filled.


Can anyone help me out or point me in the right direction? 


Thanks in advance :)

2025-02-04 10-17-42
Shreelakshmi N S
Champion
Solution

On save you need to include Form1.valid and EditMoradalAlternativaForm.valid on the if condition to check the form validation. That will solve this.

2025-04-17 05-42-16
Ajit Kurane

Hi,

Are validating fieds before saving or updating using formname.valid method ?

Can you please share sample oml file or snapshot ?

Thanks.

2025-02-04 10-17-42
Shreelakshmi N S
Champion

Hi,

Can you please include a screenshot for better understanding of which is the parent form and child? 

Regards,

Shree

UserImage.jpg
João Ferreira

Hello, the form in the green square works, the one in the red square doesn't

2025-02-04 10-17-42
Shreelakshmi N S
Champion

Are you checking both the form.valid on if before saving?

2025-02-04 10-17-42
Shreelakshmi N S
Champion
Solution

On save you need to include Form1.valid and EditMoradalAlternativaForm.valid on the if condition to check the form validation. That will solve this.

2021-12-23 04-28-09
Navneet Sharma

Hello,

Can you please send OML for better understanding ?

It could be helpful to us.

Thanks 

Navneet

UserImage.jpg
João Ferreira

Hello, the form in the green square works, the one in the red square doesn't



2021-12-23 04-28-09
Navneet Sharma

Can you  please proper maintain the Second From Name on the Validation Actions.

I hope it will work fine

Thanks 

Navneet

2025-04-17 05-42-16
Ajit Kurane

Hi,

Validate second forms fields before saving as shown in below image, Just you need to put your second form name there, and once again please make sure fields are mandetory or not

That would be great if you share oml file.


Thanks,

Ajit Kurane.

2023-03-16 16-29-51
Paulo Rosário

Hello João,

You mentioned that you have the list in its own form inside the parent form. I would suggest creating a Webblock for each list and handling the form validations inside that Webblock. 

Not only will this clean up your code a bit, but it will allow you to handle each list in its own form.

This approach has some challenges, you would need to create an event in each WB that tells the parent that the list is valid ( after all the validations of course ) and only then you would be able to save. 

Hope it helps! 

Paulo Rosário

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.