close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Menu item with other activates hiden field

Thread began 10/05/2010 11:59 am by chris373619 | Last modified 10/21/2010 12:36 pm by Jason Byrnes | 5939 views | 50 replies |

chris373619

Menu item with other activates hiden field

Hi,
I have A WB form and I'm trying to ad a drop down menu. I want to have a few options and then an "Other" category. If they choose the other category from the drop down menu can that activate a hide field they can type in? I see a hiden field option in FB but I'm not sure how to make it work. Can this be done?

Thanks!

Sign in to reply to this post

Jason ByrnesWebAssist

This cant be accomplished in the wizard, but you can add it manually.

You can apply Required not blank validation to the on change event of the select list, and use the show hide layer response.

I am sending a sample to demonstrate this.

to add validation to the on change event, go to Window -> Behaviors

Click on the select list in desing view, then click the plus button on the behavior window and select WA Validation Toolkit -> Client validation -> Required / Not Blank / Selection Made.

do the same for adding the show hide layer response. click the plus button on the behavior window and select WA Validation Toolkit -> Show hide Layer.

Attached Files
showHideLayer.html.zip
Sign in to reply to this post

chris373619

I tried a few things and I couldn't get it to work. The sample and my page are pretty different since I used the wizard.

This is my page. Any easier explanation on how to do it?

Attached Files
index.php.zip
Sign in to reply to this post

Jason ByrnesWebAssist

add a style to the other text box to hide it:


<input id="Contact_Us_group_Other" name="Contact_Us_group_Other" type="text" value="<?php echo((isset($_GET["invalid"])?ValidatedField("index","Contact_Us_group_Other"):"")); ?>" class="formTextfield_XSmall" tabindex="4" style="visibility;hidden"/>

Click on the select list in design view, them open the behaviors panel, Window -> behaviors.

In the behaviors panel, click the plus button and select WA Validation Toolkit -> Client Validations -> Required / Not Blank / Selection made.

make sure to apply the validation to the select list, and make sure it is applied to the onChange event.

Click the plus button again, and select WA Validation Toolkit -> Show Hide Layer.

Set the trigger form element to the Select list. Set the target form element to the other text box and set the If trigger is valid option to Hide the target layer.

again, make sure this applied to the onchange event of the select list.

Sign in to reply to this post

chris373619

Another issue

I'm trying to follow your instructions but the form elements are way off the page to the right. Anyway to fix that?

Sign in to reply to this post

Jason ByrnesWebAssist

you can try editing the Dreamweaver preferences, on the invisible elements section, turn everything off.

Or try switching Dreamweaver to Live View.

Sign in to reply to this post

chris373619

That didn't work for me. I will just deal with it off to the side. No big deal.

Sign in to reply to this post

chris373619

I still can't get this to work. I think i followed the directions but it's not working. Can you see if you see what I did wrong?

index.php

Sign in to reply to this post

neilo

At the moment it's difficult to see the problem, as all the fields are set to visibility:hidden. Could you begin by making them visible:

FD_RVStorage_currentDesign.css (line 185)

form.RVStorage_currentDesign div.fieldGroup {
display:block;
float:left;
padding-left:8px;
padding-right:8px;
position:relative;
visibility:hidden; /* change to visibility:visible */
}

And floatinf the form left so it rises to the top of the page:

FD_RVStorage_currentDesign.css (line 84)

form.RVStorage_currentDesign {
color:#000000;
float:left; /* add this float left */
font-family:Verdana,Arial,Helvetica,sans-serif;
font-size:11pt;
margin:0;
padding:0;
width:630px;
}

Then we can see how things are working?

Sign in to reply to this post

chris373619

OK. I have those changes made. See how it looks now.
Thanks

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