Jump to content
Killersites Forums

Pre-select PHP form elements based on history


joomlavideos
 Share

Recommended Posts

Hi,

 

My client would like me to build a simple PHP form for viewers to select items they would like more information on. No problem. They would like the form to be pre-selected with an item they just selected on a previous page.

 

In other words, if they were looking at a vacation page describing a trip to vegas, and they click "buy now", (btw, there will be no shopping cart) or "more info", the subsequent form on the resulting page would have that vacation preselected.

 

This is requested in an effort to keep the clicks to a minimum for the user.

 

Couldn't this be done by attaching an "ID" to the "more info" button on what ever page they came from?

 

Your help is appreciated.

Link to comment
Share on other sites

  • 2 months later...

Thanks for your replies. I did end up passing an ID via the link and used the $_GET to both, show the "vacation" name visibly on the form, and also to pass the ID through the form data using a hidden input! :clap::)

 

So thanks for your help.

 

P.S.

 

@Ben - your logo is VERY cool!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

Loading...
 Share

×
×
  • Create New...