Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Form input and eCommerce.. need help

New Here ,
Nov 20, 2008 Nov 20, 2008
I'm currently setting up a very small ecommerce website where I sell my service (so it's one item, nothing too big). I've been using lynda.com and it's helped, but this is my problem. On the order page, where the billing info is entered, I need to have forms there because the customer needs to enter specifications, so that upon entering billing information and the input fields, and hitting BUY or w/e, all of the info they entered is sent to my database (or email, or wheever I access it). Does anyone know if this is possible?

Edit: I'm using Dreamweaver CS4, and Cartweaver ColdFusion 2.
TOPICS
Getting started
449
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 20, 2008 Nov 20, 2008
It's possible.

What part are having difficulty with?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 20, 2008 Nov 20, 2008
quote:

Originally posted by: Dan Bracuk
It's possible.

What part are having difficulty with?


The code. The billing info and the input fields would all be on the same page, so when he hits the button to submit his order, I want all the info to be dispatched properly. I've tried googling the code for this but can't seem to find it. I'm a noob.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 20, 2008 Nov 20, 2008
NouOU wrote:
The code. The billing info and the input fields would all be on the same page, so when he hits the button to submit his order, I want all the info to be dispatched properly.

It's a wide area and yet you say so little about what you need. Do you know how to code HTML forms and how to process the submitted result? That is all it takes.

Store the billing information you already have as the value attribute in the respective form fields. Use hidden fields for information you don't want to show the user. In the following examples, I have assumed that you have adopted the common practice of storing information about an order in a session.

<SELECT NAME="color">
<option value = "">Select color</option>
<OPTION VALUE="g">Green</option>
<OPTION VALUE="b">Blue</option>
<OPTION VALUE="y">Yellow</option>
<OPTION VALUE="o">Orange</option>
<OPTION VALUE="#session.colorCode#" SELECTED>#color#</option>
</SELECT>

<input type="Text" name="itemName" value="#session.item#">

<input type="hidden" name="orderCode" value="#session.code#">


Create new input fields to enable you to get new information from the user. For example,

Your e-mail address: <input type="Text" name="email" size="30" maxlength="100">



Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 20, 2008 Nov 20, 2008
nouOU wrote:
> I'm a noob.
>
>

First thing to learn is that in technical discussions it is important to
describe what 'billing info' and 'dispatched properly' means.

The only thing I can guess is that you are displaying previously
collected information as well as form fields to collect more information
and you want all this information sent to the back end for processing on
submission.

In this case then you just need to learn about the <input
type="hidden"...> control and|or how to use session scope to store
information previously collected.

If this is not it, then you are unlikely to get more help without a
clearer description of the problem you are trying to solve, how you have
already tried to solve it, and why your solution is not successfully
solving the desired problem.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Nov 21, 2008 Nov 21, 2008
LATEST
Billing Info Page:
<form action="end.cfm" method="post" name="done">
<cfoutput>
<input name="Name" type="text" id="Name">
<input name="Buy" type="submit" class="buttons" value="Buy">
</cfoutput>
</form>

End.cfm page:

<cfparam name="Form.Name" default="">
<cfquery name="name" datasource"datasource">
Insert Into Tablename (columnname)
Values ('#Name#')
</cfquery>

<cfmail from="w/e@domain.com" to="w/e@domain.com" subject="name" type="html">
#Name#
</cfmail>

---redirect to another page----
<script>
self.location="page.cfm;"
</script>



that's how I understand your question....hope it helps
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources