THS
going with the flow Posts:48
|
11-08-2010 11:19 PM |
|
For search reasons, I want to concatenate two sets of fields into singular hidden fields. For example, the submitter would select up to three states from three separate drop-downs (we don't want to use a multi-select list box) in the form but I want the values of those three drop-downs to be contatenated together into a hidden field so they'd be stored like this: Arizona, California, Oregon. The second set of fields would be long text fields where they'll enter city names that will all be concatenated into another hidden field. I've done quite a bit of calc fields adding up numbers and such, but not sure how to "add" non-numerical values together from a listbox/text field. What's the Jscript for doing that?
-Tim |
|
|
|
|
Chad Nash Posts:5260
|
11-09-2010 05:07 AM |
|
Hi Tim - This should be pretty easy actually... Within each of the combo box's I think you would have something like this client side event. Assuming your hidden field had a short name called MyValues $(MyValues) = $(ComboBox1) + ',' + $(ComboBox2) + ',' + $(ComboBox3) In general if these are not integer values it will try and concatenate them instead of actually adding them as numeric values. Thanks! -Chad |
|
|
|
|
THS
going with the flow Posts:48
|
11-09-2010 10:07 AM |
|
OK, that worked great. Thanks! |
|
|
|
|
Ryan Bakerink
river guide Posts:1900
|
11-15-2010 12:17 PM |
|
Hello THS,
Glad to hear everything's working great for you.
If you have any questions please let us know.
Thanks,
Ryan |
|
|
|
|