"This is a required field." with a red font??

leo 19 Feb, 2008
Is it possible to have the message for the required fields shown with a red font??

Now it is; This is a required field.

But i would like to have; This is a required field.


Is it possible? If so, how do i have to do this???
GreyHead 19 Feb, 2008
Hi leo,

Look at the class that's set for the messages and change your css to do whatever you like with it.

Bob
leo 19 Feb, 2008
Do you mean the css of the template?? ๐Ÿ˜Ÿ

I'm a newbie with code and don't know how to do this. Is it possible to ad some code in the javascript file validation.js to have the same result??
Max_admin 20 Feb, 2008
Hi Leo,

First I suggest you get FireFox as this will make your mission easier, now view the page source (right click the page then View Source), now check the validated fields HTML tags, you will find that they have some classes, something like class="whatever", now at your template css add new line at the end like this :

.whatever{
color:#ff0000;
}

That should do it, please search the forum for "validation css", there are manyyy posts about this before๐Ÿ™‚

Cheers,

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
GreyHead 20 Feb, 2008
Hi leo,

The validation Javascript generates the error message like this
<div id="advice-required-name" class="validation-advice" style="opacity: 0.999999;">This is a required field.</div>
You can format this by creating css for the 'validation-advice' class. Here's an example
<style type="text/css" >
div.validation-advice {
  font-weight:bold; 
  font-style:italic;
  color:red; 
}
</style>
Put this at the beginning of you Form HTML and it should do what you want.

Bob
leo 20 Feb, 2008
Oke thank you so far!!

I put the style type in the first line of the form.
But where do i have to put;
<div id="advice-required-name" class="validation-advice" style="opacity: 0.999999;">This is a required field.</div>

Is this in validation.js?

Perhaps you can tell me in what file and on what line?
I don't see a div in the validation.js file.
GreyHead 20 Feb, 2008
Hi leo,

You don't put it anywhere - it's the code that ChronoForms and the validation script already create. Look at the source code for your form.

Bob
leo 21 Feb, 2008
:) Thank you!!! My problem is solved!!! ๐Ÿ™‚
raimond 29 Oct, 2008
is this also possible with a popup or lightbox?
GreyHead 30 Oct, 2008
Hi raimond,

Probably but I wouldn't have a first idea how to go about it.

You might find some clues in the Dexagogo Google group - that's the group for the Really Easy Form Validation code that ChronoForms uses.

Bob
This topic is locked and no more replies can be posted.