close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Drop down list

Thread began 1/15/2010 5:08 pm by FARRSX4397970 | Last modified 1/26/2010 4:52 pm by Eric Mittman | 1615 views | 11 replies |

FARRSX4397970

Drop down list

I am using dreamweaver and I am unsure of what code I need to add to make work, please help.

<form action="" method="post" name="state_id" id="state_id">
<label for="State_id">State:</label>
<select name="State_id" id="state_id" accesskey="e" tabindex="1">
<option>Alabama</option>
<option>Alaska</option>
<option>Arizona</option>
<option>Arkansas</option>
<option>California</option>
</select>
</form>

Sign in to reply to this post

Eric Mittman

I do not understand what is being requested here, please post back and detail a little about what you are hoping to accomplish and what you have now and include any other details that you think would be relevant.

Sign in to reply to this post

FARRSX4397970

Drop down list

I have the Contact form solutions pack, I have added unvalidated boxes such as company address and city. I am trying to add a drop down list where someone can pick their state.
Here is the link to see what I am trying to do. contactus.php
Every thing works until I add this function. So a couple of things first I can't submit at all while this is in place. Second, what do I need to add to get it to appear in my email because I am sure I am missing some code.
So you know I am learning everything on fly no previous knowledge of web building.

Thanks,
Jeff

Sign in to reply to this post

neilo

The guide is here (in case you missed it!)

You have added extra <form> </form> tags around your 'select' code. You should remove those.

Your code should look like this:

<label>State
<select name="state_id" id="State">
<option>Alabama</option>
<option>Alaska</option>
<option>Arizona</option>
<option>Arkansas</option>
<option>More States</option>
<option>Washington</option>
<option>West Virginia</option>
<option>Wisconsin</option>
<option>Wyoming</option>
</select>
</label>



Edit: removed duplicate 'name=' from code!

Sign in to reply to this post

neilo

You may also want to add the following as your first option:

<option selected="selected">Select</option>



This will make 'Select' appear in the drop-down list instead of 'Alabama'. This is useful, so that if people don't bother to select a State, you won't have an unusually high number of people apparently entering 'Alabama'.

Sign in to reply to this post

FARRSX4397970

Drop down list

Thankyou very much. Since I have your attention maybe you can help me with a few other things. First, how can I get the Zip input box next to "ZIP:"?
<label for="State_id">State:</label>
<select name="State_id" id="state">
<option selected="selected">Select</option>
<option>Alabama</option>
<option>Alaska</option>
<option>Arizona</option>
<option>Arkansas</option>
<option>California</option>
</select>
<label for="Zip">Zip:</label>
<input name="Zip" type="text" class="inputValue" id="Zip" />
</label>
Second, can I add a reload box next to the captcha image and if so how?

Thanks again,
Jeff

Sign in to reply to this post

neilo

Hi Jeff,

It would be something like this:

<label>
<input type="text" name="Zip_Code" id="zip" />
</label>



It would be good to have a reset button for the captcha numbers (image) and I'm sure it's easy; but I don't yet know how exactly to do this - so I'm glad you asked - hopefully someone will post the answer.

I have tried putting a 'Reset' button on my form which works OK for resetting the values entered 'into the page (see my example here), but this doesn't reset the captcha image. The button somehow needs to reload the: 'WA_ValidationToolkit/WAVT_CaptchaSecurityImages.php' page.

A simple way would be to place a simple link on the form which links to the same page it's on:

<a href="contactus.php">Reset the Code</a>

This would reload the page, and therefore the captcha image as well. Not the most elegant solution, but it will 'work' and someone will hopefully provide the proper answer!

Cheers.

Sign in to reply to this post

Eric Mittman

Using a button to update the captcha code would require coding some ajax type of calls to get the server side page reloaded without reloading the form itself. Using the link is a good workaround for this rite now.

I have added a feature request to get this option available in the future.

Sign in to reply to this post

FARRSX4397970

Reset button

Is there an easy way to add a reset button that looks like the submit image in the Contact form solutions pack. This is the text I have now.
<a href="contactus.php">Reset the Code</a>

Sign in to reply to this post

Eric Mittman

If you are just wanting to make a link with an image you can just put the <img inside of the <a like this:

html:
<a href="contactus.php"><img src="your image for the button" alt="reset form"/></a>
Sign in to reply to this post
loading

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

Content

rating

Layout

rating

Ease of use

rating

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...