Repopulating multiple values in drop down box

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Repopulating multiple values in drop down box

vinay.cp
Hello All,

I have a drop down box in my application which has allow-multiple="true". After submitting the form, the value gets stored in the database in the form of comma separated values like {MO,TU,WE}. I have to repopulate the form from the database when the edit button is clicked. The drop down box does not get repopulated if multiple values were previously selected but it gets repopulated if a single value was previously selected from the drop down box. Could you please let me know if there is any way I could repopulate the drop down box with multiple values selected?

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Repopulating multiple values in drop down box

Jacques Le Roux
Administrator
You could try to use smselect jquery plugin
There is an example at https://demo-trunk.ofbiz.apache.org/example/control/FormWidgetExamples (Multiple drop-downs)
And a real use at https://demo-trunk.ofbiz.apache.org/webtools/control/LinkGeos

Jacques

From: "vinay.cp" <[hidden email]>

> Hello All,
>
> I have a drop down box in my application which has allow-multiple="true".
> After submitting the form, the value gets stored in the database in the form
> of comma separated values like {MO,TU,WE}. I have to repopulate the form
> from the database when the edit button is clicked. The drop down box does
> not get repopulated if multiple values were previously selected but it gets
> repopulated if a single value was previously selected from the drop down
> box. Could you please let me know if there is any way I could repopulate the
> drop down box with multiple values selected?
>
> Thanks.
> --
> View this message in context:
> http://ofbiz.135035.n4.nabble.com/Repopulating-multiple-values-in-drop-down-box-tp3254279p3254279.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>


Reply | Threaded
Open this post in threaded view
|

Re: Repopulating multiple values in drop down box

vinay.cp
Thanks Jacques. Much appreciated

Jacques Le Roux wrote
You could try to use smselect jquery plugin
There is an example at https://demo-trunk.ofbiz.apache.org/example/control/FormWidgetExamples (Multiple drop-downs)
And a real use at https://demo-trunk.ofbiz.apache.org/webtools/control/LinkGeos

Jacques

From: "vinay.cp" <vinay.cp@iiitb.net>
> Hello All,
>
> I have a drop down box in my application which has allow-multiple="true".
> After submitting the form, the value gets stored in the database in the form
> of comma separated values like {MO,TU,WE}. I have to repopulate the form
> from the database when the edit button is clicked. The drop down box does
> not get repopulated if multiple values were previously selected but it gets
> repopulated if a single value was previously selected from the drop down
> box. Could you please let me know if there is any way I could repopulate the
> drop down box with multiple values selected?
>
> Thanks.
> --
> View this message in context:
> http://ofbiz.135035.n4.nabble.com/Repopulating-multiple-values-in-drop-down-box-tp3254279p3254279.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>