Our site www.viart.com site is operated by latest Viart Shop 5 with default Clear design
Topic Information
philo
philo
----------------------------------------------------------
AIM: to colour asterisks red when a field is required!
----------------------------------------------------------
-----------------
1. the .CSS file
-----------------
The undocumented class "required" is used on most forms. It is used in your PHP & HTML code.
To use it, I have added this line to my .CSS file (around 'title, bigtitle' area (not that it matters))
 
.required {color: red; } /* asterisk on forms, etc */
 
and it works fine.
But it really should be on the default CSS file!!
 
-----------------
2. Tell a Friend
-----------------
Here they have used another undocumented class "asterisk" to represent that a field is "required".
However it has been badly implemented. See below.
To make it all work, and be consistent, you need to change the following:
 
A. In System > Global Static Messages:
For message : ASTERISK_MSG
Your text is: asterisk * - required fields
whereas it should be:
asterisk (<span class=\"required\">*</span>) - required fields
 
B. Then there is an error in templates/<user>/tell_friend.html:
NOTE: Line numbers refer to v3.6 but are probably the same in 3.5!
THE PROBLEM:
line 49. The class 'asterisk' is not enclosed in "". hence it is unrecognised.
THE SOLUTION:
To make it work, replace asterisk with "required"
and the same in lines 59 & 72.
Its all pretty obvious.
 
NOTE: The class asterisk isn't required! It's only used in this file!
 
Then it all works fine and consistently -- everywhere!
 
This all takes just a couple of minutes to implement!