Validation seems to work only if there is a single field specified. When putting multiple fields in, separating with commas as instructed, the validation is completely ignored.
I have tried
field1,field2
field1, field2
field1 , field2
and even
field1;field2
field1; field2
field1 ; field2
Still no luck! Am I missing something painfully obvious, or is there a problem here?
Hi,
this should work: field1,field2
there must be some problem with your code which makes an error into the javascript but testing here works ok, which browser and system do you use ? it even should work ok at most cases.
Cheers
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Thanks for the quick response; here's the code I'm using, and everything else is pretty much barebones:
<table>
<tr><td colspan="2">Instructions to Bookstore Employee:<Br><br></td></tr>
<tr><td><label for="receipt1">Receipt Number:</label></td><td>
<input type="text" name="receipt1" id="receipt1" size="15" class="inputbox"/></td></tr>
<tr><td><label for="receipt2">Re-Enter Receipt Number:</label></td><td>
<input type="text" name="receipt2" id="receipt2" size="15" class="inputbox"/></td></tr>
<tr><td><label for="coursecount">How many courses were purchased:</label></td><td>
<input type="text" name="coursecount" id="coursecount" size="1" class="inputbox"/></td></tr>
<tr><td><label for="email1">Student Email Address:</label></td><td>
<input type="text" name="email1" id="email1" size="50" class="inputbox"/></td></tr>
<tr><td><label for="email2">Re-Enter Student Email Address:</label></td><td>
<input type="text" name="email2" id="email2" size="50" class="inputbox"/></td></tr>
<tr><td><label for="comments">Special Notes or comments:</label></td><td>
<textarea cols="50" rows="5" name="comments" id="Comments" class="inputbox"></textarea></td></tr>
<tr><td valign="top"> </td><td valign="top">Please enter the characters that you see in the image below<br>{imageverification}</td></tr>
<tr><td></td><td><input type="submit" name="submit" value="Submit Receipt" class="button"/></td></tr>
</table>
Any clues in this?
Hi Max and gdpodesta,
I notice that these field already have a class attribute, I wonder if there is some conflict in adding another??
Bob
Well Bob, you get the "Clever Guy Award" for the day...that did the trick!!! Thanks everyone!
Hi Both,
Thanks gdpodesta - not feeling so clever with my main PC in for intensive care ;-(
Max, I just looked at the code and I think that the validation needs another little bit of code to search for any existing classes and add them to the validation classes. This is tricky as the class can come before the name so I think you have to identify the string from <. . .>, check if it's a form input, then parse for name and class.
I was thinking anyhow that this might be worth doing for a future version as storing an array of field names as a form parameter would allow select boxes for some of the Form configuration fields.
Of course, this is complicated by the possibility of embedded php . . .
Just a thought.
Bob
Later: I just noticed that the code makes any 'validated field' 'required', I'm not sure that this is quite right either.<br><br>Post edited by: GreyHead, at: 2007/08/16 16:05
A little unrelated, but hoping I can get some "free" help. Not much of a developer, which is why I love all this joomla stuff...is there a built in way, or another easy way to validate that one field is the same as another? In the sample code, I'd like to ensure that the receipt number is correctly entered, as well as the email address.
Thanks again guys....most sincerely appreciated!