Form Validation Error Placement

Discussions related to modeling and execution of forms.
Forum rules
Make sure every topic contains information about your LSPS version and if relevant also your server OS, client OS, database name and version, and application server name and version.
ssmelche
 
Posts: 36
Joined: Thu Mar 14, 2013 5:01 pm

Form Validation Error Placement

Mon Oct 05, 2015 6:04 pm

Hello, I'm using LSPS 3.0.1014 and have a question about form validation error placement.

I have several forms that have reusable forms, and was wondering if there is a way to have the validation error placement show up on a specific field on the reusable form? Currently when I use the Content Assist feature it only detects the ID's of elements on the parent form and not elements in the reusable form despite those element having an ID.

For example, I want to require a first name and when one is not entered I want the validator error placement to be around the first name in the RequestDetails subform.

Capture.PNG
Capture.PNG (85.21 KiB) Viewed 3263 times


Capture2.PNG
Capture2.PNG (3.62 KiB) Viewed 3263 times

Radovan Cervenka
 
Posts: 48
Joined: Mon Feb 27, 2012 2:47 pm

Re: Form Validation Error Placement

Wed Oct 07, 2015 3:50 pm

Basically, there are two simple possibilities:

1. You can put the validator to the reusable form itself. If its usage requires different validations in different situations (inclusions in different forms), you can use parameters of that reusable form to control validation conditions or error messages.

2. Alternatively, you can use data validations, which can treat different situations by different tags. I would recommend this option, because you do not need to specify the same validations in all forms the data appears; you just specify the data constraints once.

Martin Vysny
 
Posts: 51
Joined: Thu Dec 12, 2013 9:39 am

Re: Form Validation Error Placement

Thu Oct 08, 2015 10:00 am

3. Perhaps this will help: https://docs.whitestein.com/lsps/3_0/fo ... tionerrors . A first approach could be to define a proper include closure on the 'first name' component. Please let me know if this helps.

Return to Forms

Who is online

Users browsing this forum: No registered users and 1 guest