Skip to main content
Oct 25, 2007 4:44 AM UTC
Question

Multiple Spry Textfield Form Errors

I've been trying to figure out how to add multiple different types of errors to only ONE text field. I read in the LiveDoc all you have to do is insert a new span with the corresponding class identifier but it didn't give an example of how my widget would look like. I want this:

var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "none", {validateOn:["blur", "change"]});

combined with a min and max characters value AND a character counter. Is this possible?

Here's the included SPRY Script at the bottom of the page:
<script type="text/javascript">
<!--
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "none", {validateOn:["blur", "change"]});
var sprytextarea1 = new Spry.Widget.ValidationTextarea("sprytextarea1", {validateOn:["blur", "change"]});
var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2");
var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3");
//-->
</script>
This topic is closed to new replies. Start a new post to keep the conversation going.

1 reply

Randy Edmunds
Adobe Employee
Adobe Employee
Aug 8, 2010 4:53 PM UTC
I've been trying to figure out how to add multiple different types of errors to only ONE text field. I read in the LiveDoc all you have to do is insert a new span with the corresponding class identifier but it didn't give an example of how my widget would look like.

Try asking this question on the SPry forum:

http://forums.adobe.com/community/labs/spry

HTH,

Randy

Translate