I am trying to use a light box to show a pop-up contact form but for some reason the form is not coming up. It is just coming up with the loading animation but the form isnt showing. I have tried everything I can and I am out of ideas.
If anyone could help me I would greatly appreciate it.
Well, a few things are wrong. If you look at the console (usually F12 > Console) you can see a whole bunch of 404 errors. You’ll probably want to fix them.
Secondly, it seems you are trying to open a second page within the lightbox (an iframe?)
AFAIK Lightbox2 doesn’t do iframes. I would recommend colorbox instead.
When I look at the code, I do not see anything that would be calling all the 404 errors.
As for the form, It is not on a second page, it is basically a contact form in a lightbox. Now if I take the “visibility:hidden” away, it will show, but it shows under the content. So I know it is there, i just need it to show in the lightbox.
I’m not sure why it is reporting the error as being caused by line 35 though.
If you look through the rest of your includes, I’m sure you’ll find the other errors.
As I said, Lightbox2 only supports images. You’ll need to use another Lightbox-type script.
Plus, it is working for me in Chrome, latest:
Yes, I changed the code following a members advice. I was able to get the form to show but it isnt sending the data. I am slowly trying to work this out, but being new to php it is taking a bit of time.
Basically when a visitor requests info on a product, I need the email to be sent that says something like
Someone has requested info on product ABC Bulk Depalletizer
Name - Visitors Name
Email - Email
Phone - 123-456-7890
But I cannot figure out how to get the product info sent, there are 100’s of products and the page url looks like the one I showed above, The item number changes based on the item.
Ok, so taking new-product.php?Item=26 as an example, when I click on “More Information about this product” I see the form in the lightbox.
Within the form, you have marked three fields with an asterisk (name, email and phone). I am assuming that you wish to validate these on the client-side when the form is submitted. Is that correct?
I would do this in PHP.
I assume you have all of your product info in the database, so would it be possible to output it to the page if it is present and skip it if it isn’t?
Correct, I do have my page written in php, what I am after now is getting the form to send the product info. It is sending the usual info but not the stuff being pulled from the database.