Required field validation for multiple forms in single screen
Application Type
Reactive
Service Studio Version
11.14.8 (Build 58515)

Hi all,

I used wizard tool with four steps which captures address. Each step has If statement and it has set of input fields. If we click on step one it has set of input fields and for two, three and four are same. each has set of input fields. I have a button to move on to the next steps. If I click on the button without filling out the first step it need to show the required field error.

Below the wizard I have another pair of input and drop down I put them in a form and I added separate button for that while clicking on that button also need to provide required field for that two input and drop down alone.

I made the button built-in validation true so while clicking on any of the button show required field error for all the inputs in the screen. I have button for wizard and another button for below wizard inputs.

I can't make the button to place inside the specific form. And because of the that I can't make the button IS Form default as yes.

So can anyone tell me how to perform validations for separate  forms in the same screen with different  buttons.

Thanks in advance

Doubt4.PNG

hey @Vishnupriya S ,

Sorry, sorry vishnupriya allocated with some other works.

Here it is while you switch to second wizard with out filling the given inputs which you had created it will through a validation that field is required.

I made some changes. Please  find the attached OML for your reference and Demo Link.

Please go through the OML and check the code and modify as per your requirement because I Added validation for only first to second wizard.

Link : DEMO Link

I Hope this helps.
Please acknowledge the same.

- Palle Vijay Bhaskar Reddy

Doubt_Cleared.oml

Hello vishupriya S ,

Can you share sample or POC oml  for better understanding
because i am not understanding your form is inside the web block ?
and they web block your calling on screen ? if not then
wizard with four form is right ?


Thanks and Regards,

Akshay Deshpande

So Sorry I can't able to share the module or POC of this project. Meanwhile as like you mentioned there are totally four forms for the address part and separate form for the phone number part.

while clicking on the add phone the required field validation is throwing out for address parts also. Like wise while clicking on the add address it show error for phone number forms. This should not happened the respected form needs to get triggered when the respective buttons are pressed.

But I can make the button to place inside the respective forms and can't make it as Is Form Default to yes.

Is there any other way to throw required field error without using the forms.

Doubt5.PNG

I have attached an sample OML for you can have a look into it and help me out?

Hi @Vishnupriya S,

If you give some more clarity on your requirement or reproduce your doubt in your personal environment and share the OML, If possible , We can help you.

Before that, as per my understanding Validations while switching the tab.
I'm sharing the solution here, please check through this if similar add comments.

Here I added the validations that account number should not be null value.


Note : just for giving an overview I'm sharing the demo link.
Please find the attached OML and Link.

Link : DEMO link

I hope this helps and you'll found the solution.

-Palle Vijay Bhaskar Reddy

leaseaaaaaaaaaaaaaaa! SAMPLE.oml

Thanks Vijay,

But I didn't used the navigation tab. I used the wizard tool. I wizard I have for IFs each has set of container with input fields current step =1 means first IF will be shown current step =2 means second If will be shown.

I have attached the oml which some how I recreated from my project not the exact. there clicking on either any of the button shows required field for all the input boxes. I need to show that error with respective inputs for eg addresses, addaddress button should show the error, for phone numbers clicking on addphone should show the error.

Doubt.oml

I have attached the OML as per you advise can you please help me out to resolve this issue

hey @Vishnupriya S ,

Sorry, sorry vishnupriya allocated with some other works.

Here it is while you switch to second wizard with out filling the given inputs which you had created it will through a validation that field is required.

I made some changes. Please  find the attached OML for your reference and Demo Link.

Please go through the OML and check the code and modify as per your requirement because I Added validation for only first to second wizard.

Link : DEMO Link

I Hope this helps.
Please acknowledge the same.

- Palle Vijay Bhaskar Reddy

Doubt_Cleared.oml

Hi ,

hope you are doing well,

use form.valid for each of the action

eg form 1 submit action  use form1.valid


form 2 submit action use form2.valid

Link



Hi Vignesh thanks for the reply,

But that is not happening in my case. I can't able to paste the buttons inside the respective forms. I need to have buttons outside the form. If I make the button to built in functions yes it is hitting all the forms in the screen. 

throwing required field validation for all the input fields in the screen. I need to throw them for the respective forms with respective buttons.

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