22402 Posts in 6882 Topics by 2748 members
|Go to End|
27 March 2009 at 4:45am
I have a contact (userdefined form) and a newsletter signup ($SignUpForm) on the same page. The validation is messy. When you hit submit on the contact form, an error message appears 'object does not support this property or method' and the form validation fields turn from strings to 'EditableEmailField3 is required'.
Does anyone know how i can fix this please?
8 April 2009 at 2:18am Last edited: 8 April 2009 2:19am
I had this issue to and didn't find a way to have the SS validator working on two form siultaniously so I just disabled it from one of them changing the id of the <form> element from 'Form_Form' to 'QuestionForm' using a line of jQuery: $('#questionForm form').attr('id', 'QuestionForm');
I then wrote a simple jQuery validator to replace it on that form.
Hope that helps
19 May 2009 at 4:36am
Aram & Briohny,
So, this may be a sort of different question than the two forms issue, however I'm trying to ADD a form field validation and I can't seem to figure it out.
On my customform, can I simply add a validator just for the field I'm trying to validate. It looks like for required fields the validator is already add.
Then, what in the world does this look like?
Thanks for your insight,
19 May 2009 at 5:07am Last edited: 19 May 2009 5:10am
if you look at my tutorial for creating a simple contact form in part 2 you will see a bit where we define $validator[ with the names of the fields we want to be validated. Then you just pass this into the Form() function as an argument and that's it, validation added
EDIT: actually I think I misunderstood your question......not entirely sure what you mean, you don't want to add a required field but you do want it to be validated? I'm confused :s
19 May 2009 at 5:35am
My apologies for the confusion.
I actually do have a required field that I also need to add some more validation to. Specifically, I have a phone number field that is required and I also need to make sure the field has at least 10 digits to it.
Everything works perfectly, except now I need to add the extra validation for the 10 digits on the phone #.
I'll check out the tutorial. Thank you for responding. I'm (I pray) down to the last 10 items that the client is asking for and I can go live. (first SS project)
19 May 2009 at 5:42am Last edited: 19 May 2009 5:43am
Ahh ok I am with you now. There is a phone number field although it's for newzeland numbers so not sure it it will do what you want.
Otherwise if I were you I would remove the SS validation from the field and then add some custom jquery validation to the field using a seperate script.
And ignore my reference to that tutorial, it wont help
19 May 2009 at 5:47am
There is an example of some simple jQuery validation here: http://www.willjessup.com/sandbox/jquery/form_validator/form_validate.html
19 May 2009 at 5:53am
yeah, yeah - I was headed that way with the jquery validation, then my brain got tweated on how to implement it.
I'll head back to the jquery solution.
|Go to Top|