+ Reply to Thread
Results 1 to 10 of 10
  1. #1
    I spend too much of my life on TPF!
    Join Date
    Oct 2006
    Location
    Arkansas
    Posts
    337
    My Gallery
    (0)
    My Photos Are NOT OK to Edit
    Liked
    0 times

    Exclamation html form question! help!

    so here's the deal.

    i'm trying to add a purchasing form to my site.
    basically, a person fills out the form, the info is emailed to me, and i send them a paypal invoice.

    the question is: how do i add some sort of thing to be able to purchase more than one photo per form? maybe somehow clicking an 'add another photo' sort of button that adds another section of the form automatically?

    look at the site home>purchasing and you'll get a better idea of what i mean.

  2. # ADS

  3. #2
    I spend too much of my life on TPF!
    Join Date
    Feb 2006
    Posts
    624
    My Gallery
    (0)
    My Photos Are NOT OK to Edit
    Liked
    0 times
    If I were you I would consider buying a script that ads a shopping cart type of thing to your site or just build your website off of a script like ecommerce. These scripts have a bunch of templates out there or you could get someone to code a design to work with it but ecommerce is one of the more popular scipts out there. Also try www.hotscripts.com for some free and good scripts maybe you can find one that will work.
    Sony a700 - Sony 18-70mm f/3.5-f/5.6 - Sony HVL-56AM Flash - Minolta 50mm F/1.7

  4. #3
    I spend too much of my life on TPF!
    Join Date
    Oct 2006
    Location
    Arkansas
    Posts
    337
    My Gallery
    (0)
    My Photos Are NOT OK to Edit
    Liked
    0 times
    if you look at my galleries, you'd see that those ecommerce things won't go with the flow of the site. i like my flash galleries, and would like to just be able to have people buy a picture by knowing it's number in the gallery.

  5. #4
    Troll Extraordinaire
    Join Date
    Mar 2005
    Location
    San Francisco
    Posts
    5,430
    My Gallery
    (0)
    My Photos Are NOT OK to Edit
    Liked
    30 times
    The moment you cheat for the sake of beauty, you know you're an artist.

  6. #5
    I spend too much of my life on TPF!
    Join Date
    Oct 2006
    Location
    Arkansas
    Posts
    337
    My Gallery
    (0)
    My Photos Are NOT OK to Edit
    Liked
    0 times

    Exclamation arrrrrrgh

    so i was messing around with it and now when the form e-mails, there isn't anything in the text. will someone look at the source and tell me why?
    this is tricky business.

  7. #6
    No longer a newbie, moving up!
    Join Date
    Oct 2006
    Posts
    94
    My Gallery
    (0)
    My Photos Are OK to Edit
    Liked
    0 times
    It probably has something to do with your form action being "http://www.hostmonster.com/monstermail", I haven't used their service (or whatever it is) so I wouldn't know specifics, but my guess is it's them.

    Personally I would look into a simple PHP form email script, then you could customize i however you wanted.
    Ian Johnson Photography <- My photography site

  8. #7
    I spend too much of my life on TPF!
    Join Date
    Oct 2006
    Location
    Arkansas
    Posts
    337
    My Gallery
    (0)
    My Photos Are NOT OK to Edit
    Liked
    0 times
    (i don't know that much about html)

    the monstermail is just the e-mail service my hosting has. that forwards the info to my webmaster e-mail.
    i'm not talking about the e-mailing of the info, just how to add more lines to purchase pictures by clicking a sort of 'add another line' button.
    know what i'm talking about??

    come on tpf, these are some of the weakest responses i've ever gotten!

    as soon as i finish this form then my website will be COMPLETE!
    muahaha.

  9. #8
    No longer a newbie, moving up!
    Join Date
    Oct 2006
    Posts
    94
    My Gallery
    (0)
    My Photos Are OK to Edit
    Liked
    0 times
    Well if you want to have a truly infinite amount of possible text boxes, you'll want to look into Javascript and adding elements to the DOM, then you'll want to write a function to dynamically name and append these new fields

    Another less scalable way would be to put in for example 10 extra fields that all start hidden, then use JS to display them one by one when the user clicks add another field
    Ian Johnson Photography <- My photography site

  10. #9
    I spend too much of my life on TPF!
    Join Date
    Oct 2006
    Location
    Arkansas
    Posts
    337
    My Gallery
    (0)
    My Photos Are NOT OK to Edit
    Liked
    0 times
    i wish i knew how to do that. any tips would be helpful.

  11. #10
    No longer a newbie, moving up!
    Join Date
    Oct 2006
    Posts
    94
    My Gallery
    (0)
    My Photos Are OK to Edit
    Liked
    0 times
    Here's something simple (by the way, TPF needs the [code] tag so this would look normal)

    Play around with this example and see what you can extrapolate from it, and if you run into problems feel free to ask, I remember first learning Javascript, and it *sucked*, it's just not a friendly language to learn

    Javascript
    <script type="text/javascript">
    var i = 1;
    function showNext()
    {
    document.getElementById('text' + i).style.display = 'block';

    i++;
    }
    </script>

    HTML
    <input type="text" name="text" id="text" value="" />
    <input style="display: none;" type="text" name="text1" id="text1" value="" />
    <input style="display: none;" type="text" name="text2" id="text2" value="" />
    <input style="display: none;" type="text" name="text3" id="text3" value="" />
    <input type="button" onclick="showNext();" value="Add" />
    Ian Johnson Photography <- My photography site


 

Sponsors

Posting Permissions

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

Similar Threads

  1. In need of some HTML help
    By Formatted in forum Off Topic Chat
    Replies: 4
    Last Post: 01-28-2011, 02:57 PM
  2. HTML Help
    By dtzitko in forum Off Topic Chat
    Replies: 3
    Last Post: 04-21-2010, 09:46 PM
  3. HTML help please
    By wxnut in forum Off Topic Chat
    Replies: 3
    Last Post: 09-09-2008, 09:06 AM
  4. Release form question
    By Dagwood56 in forum General Shop Talk
    Replies: 21
    Last Post: 02-18-2008, 10:21 AM
  5. HTML question
    By MDowdey in forum Off Topic Chat
    Replies: 31
    Last Post: 08-24-2005, 11:14 AM