View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Add list label to description in cart

Thread began 11/14/2009 10:02 am by info171762 | Last modified 11/16/2009 1:10 pm by info171762 | 627 views | 2 replies

Eric Mittman

There are a couple of ways you can get the label to appear in the cart as well. I think one of the easiest would be to use some js to set the label of the selected extra length to another hidden form element, then you can bind this hidden form element to a column in your cart that will hold the name of the extra length option.

The js to do this is not very complex, basically you just set the value of the hidden form element to be the text of the selected index for the select list. I think it is cleanest to use a function for this. Here is an example form with a select list and a text input to demonstrate how you can do this.

<form name="form1" id="form1" method="post" action="">
<select name="select1" id="select1" onchange="setValue(this.options[this.selectedIndex].text, 'text1');">
<option value="0">none</option>
<option value="1">one</option>
<option value="2">two</option>
<option value="3">three</option>
<input type="text" name="text1" id="text1" />

And here is the js that will make this work.

<script type="text/javascript">
function setValue(theVal, theInput){
document.getElementById(theInput).value = theVal;

You can even use this same function call to do this, you would just need to update the name of the hidden form element in the function call.

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...