I had the lightbox gallery working perfectly. I then decided to add a new signup form and added the following code to my page.php file:
function SignUpForm() {
return new Form($this, "SignUpForm", new FieldSet(
new EmailField("Email", "Email Address")
), new FieldSet(
new FormAction("signup", "Sign up")
), new RequiredFields(
"Email"
));
}
function signup($data, $form) {
$member = new Member();
$form->saveInto($member);
$member->write();
if($group = DataObject::get_one('Group', "Code = 'ISA-NEWSLETTERS'")) {
$member->Groups()->add($group);
}
Director::redirect('thanks-for-registering/');
}
This form works great, only now my lightbox doesn't work. The gallery thumbnails appear but when you click on them nothing happens. Firefox gives the following two errors:
1. Prototype.Browser is undefined
2. $("lightwindow_navigation") is null
These errors didn't appear before i added the signup form code. Can anyone shed some light?
Many thanks again.