Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Lightbox 2 and form validator problems


Reply

4 Posts   2771 Views

Avatar
Nobrainer Web

10 April 2010 at 9:10am Community Member, 135 Posts

Hi, having some JS problems. I want to use LightBox2 on a projekt. The projekt has a custom form on all pages.
The validator of the form loads jsparty/prototype.js and that seems to conflict with lightbox/js/prototype.js or atleast if i don't output the form (deleting my $ContactForm from the template) all is fine and lightbox works.

Can anyone tell me how to have both a form and a lightbox on same page?

Avatar
Nobrainer Web

10 April 2010 at 11:07pm Community Member, 135 Posts

I have found a way to get lightbox working, by disabling JS validation for my ContactForm, but ofc. I will now have to find another solution for frontside validation.

http://doc.silverstripe.org/doku.php?id=validator#disable_javascript_validation

Avatar
SSadmin

15 April 2010 at 9:54am Community Member, 90 Posts

i have noticed the same problem.
the ss2.3 brunches using the Jquery 1.26. which was kinda old, as well as the validation plug-in.
Not sure which version of Jquery of your lightbox2 will be using.
If it's over 1.2.6. You probably could update the Jquery validate plug-in. update it to be compatiable with Jquery 1.3.2 then update your core Jquery.js file to be Jquery-1.3.2.js .

You can have a try, see it works or not.. XD

Alex

Avatar
Nobrainer Web

15 April 2010 at 7:08pm Community Member, 135 Posts

Hi ALex,

Thanks for your reply, i will have a look at this.
I properly wont get around to it one of the first days though, but would be nice to know for future projects.

/Thomas