Store indexed value from a click of an image

Hey everyone!

I am building a website that allows users to select from an array of travel destination photos, select how long they would like to stay for, how many people they want to travel with, and finally input an email address.

We then take this information and build them a trip based on their inputs.

Below is a screen shot of a portion on my website. I am hoping to have the site visitor click on one of these images, and then immediately pass it on to the next page.

  1. How do i store a value in a database for which image was clicked on (and give it a name that is understandable)
  2. How do I reference the other collections like length of trip, how many people, and email addresses without having to manually update my databases for every new entry?


Thank you!

Iā€™m not sure how you designed this but i would suggest you to create a database for your travel destinations and show them on a repeater just like in your picture.

Then you can create a dynamic page for your travel destinations and place your form on that dynamic page. So whenever a visitor clicks any picture, they will be redirected to that pictures dynamic page and fill in the form for that specific location. Only after then you can combine all these pieces together and get a data for it on the database you create for collecting visitor submissions.

you will need 2 DB to do this.
First one is to show travel destinations on dynamic pages.
Second one is to collect the form input.

1 Like