[Silk UI Framework] Validation in Navigation Tabs

[Silk UI Framework] Validation in Navigation Tabs

  
Forge Component
(45)
Published on 10 May by OutSystems Labs
45 votes
Published on 10 May by OutSystems Labs
Hi,

I am using navigation tabs in my form. When a user submits, the client validation is only working on the active tab. I would like to validate all the tabs content when a user submits a form. How do I acheive this?

Thanks,

Depends on how your screen is set up, code, etc. Post OML please, or a sample OML.


J.Ja

Justin James wrote:

Depends on how your screen is set up, code, etc. Post OML please, or a sample OML.

 

J.Ja

 I have attached a sample oml to show the issue in detail. The sample has 2 tabs. In order to pass the client validation, I just need to enter all the mandatory values in the active tab. I know we can do a server validation but I wouldn't want the user to submit before filling the 2 tabs' content.

could you pls help me? 
 

Hi Aravind,


To attain your goal we usually follow these steps:

1. Review the form's button property Validation Parent assigning it the respective EditRecord (this is already done in your sample);

2. Review all tab's input widgets to refer to the same Validation Parent


However, from the replicated behavior of your sample, Silk UI's Navigation\Tabs seems to be breaking the default behavior, somehow. It is still only validating the active tab, not the remaining ones, even though their input widgets were set for the same Validation Parent. When removing Navigation\Tabs then both EditRecords will be validated and there won't be any form submission. I'll call attention to Silk UI team about this.



[edited post] now including my modified sample.

Pedro Gonçalves wrote:

Hi Aravind,

 

To attain your goal we usually follow these steps:

1. Review the form's button property Validation Parent assigning it the respective EditRecord (this is already done in your sample);

2. Review all tab's input widgets to refer to the same Validation Parent

 

However, from the replicated behavior of your sample, Silk UI's Navigation\Tabs seems to be breaking the default behavior, somehow. It is still only validating the active tab, not the remaining ones, even though their input widgets were set for the same Validation Parent. When removing Navigation\Tabs then both EditRecords will be validated and there won't be any form submission. I'll call attention to Silk UI team about this.

 

 

[edited post] now including my modified sample.

Thank you Pedro! As a workaround, I have changed the button's method to AjaxSubmit instead of Submit. In this way, although I am doing validation on the server side, user wouldn't notice the refresh. My goal is not to reload the page as I have some multiple file upload containers which are losing their files on re-load. 

Let me know if you are able to find any better solution!
 

Hi Aravind,

I've done some tests and I got some conclusions:

  • From what I can see, the problem is that the platform does not evaluate hidden editRecords;
  • Although this may appear to be an issue with Silk, I was able to replicate it without Silk:
    • I created an app with London Theme, used the Richwidgets Tabs, and the problem is also present.
    • I also created another page where instead of using Richwidgets tabs, I setted the Display property of the container to False. The problem remains

I'm not entirely sure if this is an issue with the platform or if its an implemented behaviour, but in either cases, I suggest that you contact OutSystems Support for further assistance.

Please let us know if you have any questions.


Cheers,

Samuel Jesus