Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: Custom Form Field Styles *saved* from destruction
katAttack
Junior Member

Posts: 6
Registered: 6/3/2005
Member Is Offline
posted on 6/3/2005 at 01:10 AM Reply With Quote
Custom Form Field Styles *saved* from destruction


I don't know how many of you find this 'feature' annoying but I did and I did something about it!

If you have a custom style assigned to fields and/or form elements being validated or used in the error 'label' function, these styles are promptly destroyed by the validation process as tiagra applies its own:

Validation Okay style = "tfvNormal"
Validation Failed style = "tfvHighlight"

My form design included alternating colours for sections of the form which meant the default style was going to be insufficient as I wanted it to return the fields/elements back to the class style they were.

I adapted the code to support the assignment of a tfvNormal and tfvHighlight style for each of the elements being defined in the validation process:

e.g
'fSurname':{'l':'Last Name','r':true,'f':'alpha','t':'fSurname', 'c': 'classNormal', 'c2': 'classHighlight'}

c : Class name to use if field/label now okay
c2: Class name to use if field/label failed validation

If these aren't in the definition table the default tfv styles are used.

Useful to know the styles assigned may be more than one, eg

'c' : 'bigHead wideSpaced'

As per the CSS definition. Creative solution for an ugly problem.
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page Product Page
Product Demonstrations Product Demos
Registration Form Validation
Login Form Validation
Free Download Free Download
Product Documentation Documentation
Documenation Page
Change Log
Validators Comparison Table
Support Forum Support Forum
 

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004