Results 1 to 9 of 9

Thread: Selection as an input into a text box

  1. #1
    Join Date
    Feb 2009
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Selection as an input into a text box

    Hi there,

    I require some assistance.

    Basically, I have an online store that allows customers to view photographs and to order them off the website.

    I need to be able to allow the customer to select the photos, and then the selected images names get put into a text box.

    It sounds simple, but I can't find a way to do it.

    All help will be greatly appreciated.

    The store can be located at:

    http://www.rsquared.co.za/store/htdocs/checkout.html

    The text box is "Comments/Special Instructions:"

    I would preferably like some sort of pop up, that once the photo's are selected, the client clicks "Confirm" and all the images that he/she has selected are put in the box (As TEXT).

    Thanks once again,

    Wolf

  2. #2
    Join Date
    Feb 2009
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Bump

  3. #3
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    It seems like you have a shopping cart already in place. Can you not access that information?

  4. #4
    Join Date
    Feb 2009
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Im not sure I understand what you are asking?

    Access what information?

  5. #5
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    If I go to http://www.rsquared.co.za/store/htdocs/ and click "buy now" for any of the items, it adds the item to the shopping cart. Then on the page that you linked to, it has the product id, description, total, etc...

    Are you looking for an alternative to this? Or are you just looking for a way for that information to be emailed to you?

  6. #6
    Join Date
    Feb 2009
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    If you have a look at this page:

    http://www.rsquared.co.za/store/htdocs/checkout.html

    Right at the bottom, there is an option for:

    "Comments/Special Instructions:"

    What I would like to do, is have a pop up that has a whole bunch of photos of a specific event, in specific folders (I'm a photographer).

    The client the selects the photo's they want, with tick boxes. They click Submit, and all the image names that they selected appear in that text box.

    Not sure if I can explain it any more than that

  7. #7
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Ahh, I see. Then that page really has nothing to do with the functionality. I was confused by your existing shopping cart functionality.

    There are a myriad of ways of going about it. It would really depend on how the rest of your system is set up.

    In the very simplest form, you could use some basic JavaScript that takes values from checkboxes, appends them to some value and sets that value equal to the value of the comments box. Here is one example of how to do this, though basic.

    As I said, it would depend on how your current work flow is and how advanced you want to make the form.

  8. #8
    Join Date
    Feb 2009
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Basically,

    Select images.

    Image names that are selected: Input into text box

    I would have no idea where to start!

  9. #9
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Right, I understood.

    The easiest place to start would probably be with the HTML. You would first create the form with a checkbox related to each image.

    Code:
    <input type="checkbox" name="image1" />
    The user would then select all the images he wants.

    Next you would use jQuery to loop over all of checked input[type='checkbox'] elements . You would then take the name attribute of the elements, concatenate them and then set them equal to the value of the textarea.

    Finally, email it off using some PHP.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •