The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> forms, confirming details from a form and submitting
iaindean
post Mar 30 2007, 07:23 AM
Post #1





Group: Members
Posts: 1
Joined: 30-March 07
Member No.: 2,372



hi, I have created this form which needs integrating into a cart system, the system only needs the final code which is created from the users inputs, basically i need the model code then size then model number then the remaining user inputs to be submitted to the cart system. I have created the form but how do i grab the forms inputs and display them in a text field which is then submitted to the cart system?

http://www.photoshootdigital.com/form.html

Im looking for a way to grab the value from a drop down and insert it into a text field when you click a button 'confirm item code', thius code then is submitted to a cart system when the form submit button is hit.

the code would be in this instance VT <value from dropdown1> 26 (value from dropdown2> <value from3><value from 4><value from5><value from 6>

then you hit submit which shows in teh text field the code formed from the above, then when they hit submit this is sent to the cart system, I only know basic JS and this really may need a function or something...any tutorials would be greatly appreciated

Iain
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Mar 30 2007, 12:12 PM
Post #2


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



Why aren't you using the cart system for this? The cart system should generate the product pages, process the form submissions, and handle the transaction details.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Brian Chandler
post Mar 31 2007, 01:18 AM
Post #3


Jocular coder
********

Group: Members
Posts: 2,460
Joined: 31-August 06
Member No.: 43



QUOTE(Darin McGrew @ Mar 31 2007, 02:12 AM) *

Why aren't you using the cart system for this? The cart system should generate the product pages, process the form submissions, and handle the transaction details.


I presume the OP is using some standard cart system: the shopping cart system does not itself "generate" product pages (how would it do that?), it accepts item codes. It seems easy to understand that in this case the item codes need to be assembled from various separate options, and standard cart systems don't do this either.

To OP: You _can_ do this with javascript, but it's not entirely satisfactory. Much simpler to use a script in php (or whatever) that handles the form submission, simply concatenates the bits, and either calls the cart function directly (if you can do this), or redirects to a cart URL. Supposing the cart is an external system at cart.com/myname?id=<productcode>, then the php script looks something like:

<?php

// build cart address
$url = 'http://cart.com/myname?id="VT';
$url .= $_GET['size'];
$url .= $_GET['input'];
*** AND SO ON concatenating bits ***

$url .= '"';

header(uhforgetdetailscheckinmanual "location=$url");



******** Incidentally:

Why is the page called "Welcome to Adobe GoLive ??

And what is _this_ junk:

<table width="180" border="0" cellspacing="2" cellpadding="0">
<tr>
<td>
<h2>VT 26</h2>
</td>
<td></td>
<td></td>
</tr>

<tr>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>

</tr>
</table>
<br>

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 27th April 2024 - 05:08 AM