html form question! help!

ironsidephoto

TPF Noob!
Joined
Oct 22, 2006
Messages
337
Reaction score
0
Location
Arkansas
Website
www.ironsidephotography.com
Can others edit my Photos
Photos NOT OK to edit
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.
 
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.
 
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.
 
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.
 
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.
 
(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.
 
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
 
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" />
 

Most reactions

New Topics

Back
Top