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

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

State field

Thread began 9/07/2009 3:10 pm by nacaron388275 | Last modified 10/22/2009 2:08 pm by Jimmy Wu | 4695 views | 35 replies |

nacaron388275

State field

I would like to know if it's possible to set a default State field in a form? What I mean by that is that once someone select a country if the required State is not listed in the dropdown menu, that a blank field appears so that people can manually type the name of the State they live in.

Sign in to reply to this post

anonymous

Are you looking for a "blank" spot in your dropdown? Or, are you looking to have a text input box that already has a state specified?

If you are using a dropdown, why not just have every state in the drop down and mark the default state using the "selected" attribute?

Sign in to reply to this post

Jimmy Wu

As Brian said, if you are using a dropdown, if you listed all the states, you wouldn't need a field for the user to enter the value.

If you wanted to use a user specified field, you could use a radio button group to specify which value to use when the form is submitted. When processing the form, you will have to add some code to check the radio button that is selected and use the corresponding value. Also, you would most likely need to not validate the two fields or add additional code to determine which needs to be validated before validating the field.

Sign in to reply to this post

nacaron388275

Canada Vs United States

I obviously did not explain myself clearly (being French is not always a good thing ;) ) Ok, here's exactly how I was my form to react. In the address fieldset I want the regular type off address field: Street, City, Province/State and Country.

1) But when someone select United States as the country, only the [b]States[/b] of that country are listed in the states/provinces dropdown menu AND when a specific state is selected, only the city located in that state should be listed in the city dropdown menu.

2) However, if someone select Canada as the country, only the [b]Provinces[/b] of Canada should be listed the states/provinces dropdown menu. AND when a specific province is selected, only the city located in that province should be listed in the city dropdown menu.

3) If United States or Canada are not the selected country, instead of a dropdown menu for the States/Provinces and for the City, there would be a required text field where people would have to manually enter their State/Province and city.

I'm in a situation where most people who will contact our company will be from either the States and Canada (since we are located in Canada).

Thank you guys, I hope this one is feasible ;)

Sign in to reply to this post

Jimmy Wu

This is definitely possible, but it would take quite a bit of hand coding. We have a product called Dynamic Dropdowns that would accomplish the behavior that you are looking for. Basically you'd set up the different states, provinces, cities, etc in a database and when the value of one dropdown is selected, it will dynamically populate the next dropdown.

Sign in to reply to this post

nacaron388275

This sounds simple to you, but the idea from buying the Super Suite was to avoid this type of situation where I have to learn how to "hand" code stuff. Now, I'll go on lynda.com and register so that I can learn how to hand code. I have a basic understanding of CSS, I bought Super Suite hoping you had codes ready to use.

Thanks anyhow.

Sign in to reply to this post

Office Guy-172461

  We have a product called Dynamic Dropdowns that would accomplish the behavior that you are looking for.  



Dynamic Dropdowns is included in Super Suite. Why not just use it as Jimmy suggests?

Sign in to reply to this post

nacaron388275

I would be more than glad to do so... but he also mentioned some hand coding. So are you telling me that if I use the DD, I won't have to hand code?

Sign in to reply to this post

Office Guy-172461

This is from the Overview:

No Coding
Dynamic Dropdowns eliminates the need for hand coding allowing you to connect multiple dropdown lists or multiple select lists.

It wasn't clear that you had the Super Suite so I beleive Jimmy was just saying it wasn't included in CSS Form Builder.

Sign in to reply to this post

Jimmy Wu

I'm sorry I was unclear. What I meant to say was that if you were to want to accomplish this without using the Dynamic Dropdowns, it would require quite a bit of hand coding. Using Dynamic Dropdowns, you will not have to do any hand coding. Sorry for the confusion.

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