views:

31

answers:

2

Hi, I'm setting up a contact form, but I have some saved information in some spans (It's an ecommerce shopping basket) and the built in checkout is awful so we're just slapping together an easy solution: turn it into an email form and email us the order instead of losing customers.

Anyway, can I use the info in the span, taking the id or name or do I have to turn it into an input? And if I do, how can I disable the input field?

Example of code I want to take into the email is in this jsFiddle, I want the spans with name="ACTUAL PRICE" etc emailed. Is this possible?

Thanks :)

+6  A: 

Maybe you want to use a hidden input field.

<input type="hidden" name="key" value="foobar" />

It is not displayed, but can be used to submit information with the form.

Sjoerd
I think I'll go down this route. Much easier to set up. Thanks :)
Kyle Sevenoaks
yup, the hidden field is the ideal solution. i use it all the time =)
+3  A: 

You'd be far better off using hidden form fields if possible. Else if the user has JS disabled you may run in to issues down the line. Rare but possible.

Ross
+1 for hidden fields.
kitsched