Jump to content

[SOLVED] Pass values of Select Multiple to Hidden input


Daniel St. Jules

Recommended Posts

Hey all,

I'm hoping someone may assist me in this matter.

 

I have a form, and the form contains a select field with multiple="multiple", and a hidden field. I'd like to have the contents of the select, upon change, be added to the hidden field. To separate the different values of the select options in the hidden field, I'd like to use spaces. So, an example of the result would be:

 

Select

option 1 value = 20

option 2 value = 40

option 3 value = 50

option 5 value = 200

 

And, if option 1 and 5 were selected, then the value of the hidden field would look like this:

 

20 200

 

Any ideas as to how I could accomplish this? Any and all help would be greatly appreciated!

Thanks.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.