Jump to content

Recommended Posts

Hey guys.

My client has a lightbox-style photo gallery, and at the bottom of each photos is a 'photo code' - it's actually just the file name minus the extension. She now wants an order form, where clients can submit photos they'd like to order, as well as options like colour or black/white, size, and so on. Once they submit the form, the info just goes to my client via email and she gets in touch with them.

 

I'm trying to get my head around how I can associate the lightbox gallery with an HTML Form (which is processed in PHP when submitted). It would be nice if customers can just click a '+' button to add a new row if they want to order additional photos, however I must also figure out how the customers identify which photo they want to order from the gallery. They could just enter the photo code from the gallery, but they could get tedious if they're ordering multiple photos. Ideally, I'd like to know how to have a button that automatically enters data photo code into the first empty row.

 

What can you guys suggest? Sorry if I am not clear!

-Rhys

Link to comment
https://forums.phpfreaks.com/topic/143216-solved-help-with-order-forms/
Share on other sites

I am not sure exactly what you are after, however, from what i understand, this may be a little tricky

Because if a visitor is configuring many pictures, like choosing black and white, etc, then, you need to save the details of each picture separately

And when the user is done, he/she can simply click on Submit-Order button, which will send your client a list of photos and the configuration of each photo at the buttom of it

You see what i mean, so, you will have to store the details of each photo separately

 

I hope i am correct

 

I think this can be done easily using PHP, because you can find many ways around it

I wasn't planning on having the photos as attachments to the email - just their 'photo codes'.

Detecting how many rows were provided in PHP and sending all the values is potentially difficult, so I am happy to just have a fixed number of rows, i.e 10. The main issue for me is how can the viewer open the photo and click a button or something to 'add' that photo's code to a row?

Ohh, i i think i see what you mean

Well, if i was in your case, i would try to use AJAX, but i dont know much about AJAX

So, I would put an Iframe at the buttom of each image, this Iframe has a form which shows a button

This button says 'ADD IMAGE'

When the visitor likes an image, he/she clicks on the button, the main page will not load, however, only the Iframe will load

A message will appear to the visitor saying, This image has been added to your choices

Solved!

I created checkboxes for each photo, which is named photo0, photo1, and so on. You can go up to as many photos as you like, because the PHP script just searches through photo0, 1, 2, etc until it reaches the number of photos that exist. Then, I just use checkboxes and radio buttons and the like for sizes and colour.

 

Regards

Rhys Andrews

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.