Recently Viewed...
DNN Modules
SnowCovered Top Sellers

Content Workflow + Versioning + Categorization + Multiple Display Options = Truly Advanced DotNetNuke Content Management (Requires DNN 4.5.1 or later)

Gloss is the first ALL COLORS! skin, featuring a powerful XML-based flash and being 100% W3C CSS XHMTL1.0 compliant. Tune it yourself on the fly, changing colors, backgrounds, containers, text color and size, width and more! Brilliant!

Ultra Video Gallery is a brother product of Ultra Media Gallery, UVG allows you to add videos in various format and automatically convert them to flv format, you also can add videos from embed code and play them in our integrated flash video player.

'Relationship Building' and 'Communication' are two essential nuts and bolts for a business to prosper. This module allows you to bridge both of these and easily generate continuous awareness of your web site, products and services. Your prospects and customers will greatly appreciate this featur

Powerful, Ajax Enabled, Easy to Use. Document Management has never been better. Open-DocumentLibrary allows DotNetNuke users to share and manage documents in a flexible, intelligent way, offering granular control over Folder and Document access.

In this day and age, knowing as much detailed information as possible about your customer, prospect or web site user is essential. Thankfully, the new 'Dynamics Forms' module from Data Springs, makes it easier than ever to segment your data collection efforts.

Ultra Media Gallery is the most popular photo gallery and media gallery solution for DotNetNuke, UMG offers 10 different flash player to browse your gallery with completely different user interface experience.

Capture your users attention, enrich your site with multimedia flash, and create and opt in distribution list for your DNN site. These are just a few of the many features the Data Springs Module Collection can provide you.

Edit documents directly on your server. The premier document management solution for DotNetNuke (DNN). Index contents of documents. Share documents across your portal and avoid duplicates. Revised and flexible UI. Extensible architecture.

ALL NEW ! - Minimalist includes skin packs in 12 great colors. Each color has Flat, Gradient and Glass versions. Feature rich XML Flash header, perfect for just about any purpose. 9 Different menu options in each skin pack; 3 horizontal menus, 3 vertical menus and 3 all-new Twin level menus . . .

    |   Register   |   Thursday, December 04, 2008   
Data Springs Product Forums...
Subject: Populate hidden field from combo box
Prev Next
You are not authorized to post a reply.

Author Messages
Troy
Posts:56
river guide
river guide

03/17/2008 8:11 PM  

I have a combo box that  that is populated via a sql driven query and I use two union queries to put the first two values as -select customer- and -add new customer- and the rest of the values come from the database.  If the user selects -add new customer- then I hide all of the "existing customer" form fields and display "new customer" form fields.  I would like to populate a hidden field with one of two values.  If a user selects a existing customers name (and <> '-select customer-') I want that value populated in a hidden field called FullName...if a user creates a new customer I want that name populated in the FullName hidden field (The existing customer full name value comes from a combo box and the new customer full name value comes from a textbox).  I thought it was going to be fairly easy to populate the hidden field but no such luck so far. 

Bret
Posts:6
skipping stones
skipping stones

03/18/2008 12:37 AM  

Troy

Have you tried to use the "Client side event" feature with "Pass values of this question to session variable"? I've used this to do similar ... ie put something like...

 

$(NewValue) = $(ShortName)

 

This works ... $(NewValue) is not a session variable but can be used by other questions.

 

Bret

Troy
Posts:56
river guide
river guide

03/18/2008 6:13 AM  

I have tried using client side events and it is not really working for me 100% of the time but I could be doing something wrong. So in my example above if a user selects a customer, does the client side event go on the select customer question or the hidden field. If I put something like $(NewVAlue) = $(ShortName) on the select customer question I get an error in the url from the very first question in my form which is a combo box (the select customer question is like the 3rd or 4th question on my form).... If I put something like $(NewVAlue) = $(ShortName) in a client side event on the hidden field, I only get a value in the textbox when I put the focus in that textbox otherwise no value is passed on when I submit the form. Does that make sense?

Troy
Posts:56
river guide
river guide

03/19/2008 12:21 PM  

I have several combo boxes on my form and I noticed that when I add a client event $(HiddenFiled) = $(SelectCustomer)  to my SelectCustomer question (which is like the 3rd or 4th combo box on the form) I get an error in the url.  The error occurs in the URL before I even get a chance to select anything from my Selectcustomer question and it keeps me from selecting anything in all of my visible combo boxes.  There error is at the end my url and is..... def=ErrorMessage

Chad
Posts:2271
river guide
river guide

03/20/2008 8:27 AM  
So if you remove the client event does that field then not display that error message? Sometimes client events and question events do not play well together... Is this combo box also firing off a question event as well? If so I would remove that temporarily to determine if you still get the error.

Little known secret... Add ?Debug=True or /Debug/True within your URL upon page load. This will render the exact client side code that is rendered and can often be useful in determining if a field ID did not get rendered properly etc...

The specific error message you mentioned here though sounds like it would have required a postback and like I said client side events do not always place nice with server side events.

-Chad
You are not authorized to post a reply.
Forums > Product Discussion - DotNetNuke Modules > Dynamic Forms > Populate hidden field from combo box



ActiveForums 3.7

Copyright 2005 - 2008 by Data Springs, Inc.
Terms Of Use | Privacy Statement