cancel
Showing results for 
Search instead for 
Did you mean: 

How to populate drop down from db in web forms?

maqsood
Confirmed Champ
Confirmed Champ
Hi,

Is it possible to populate drop down list from external database in web forms? if yes, how to achieve it?

Thanks.
4 REPLIES 4

romschn
Star Collaborator
Star Collaborator
Hi,

You may need to do some modifications in xform.js in which you can call a webscript which will get you the required data from the database and the returned data you should use to populate the text box in a web form.

I have not tried it though.

Hope it helps.

Thanks,

maqsood
Confirmed Champ
Confirmed Champ
Thanks romschn for quick reply.

Can you please elobarate the exact steps to do?

romschn
Star Collaborator
Star Collaborator
I have not any working example of this with me as I have not tried it but this is how you may achieve it.

You need to create your custom widget which will invoke a web script using dojo.io.bind and set the webscript returned value to your component.

Hope this helps.

Thanks,

venzia
Star Collaborator
Star Collaborator
Not for webform but to Share, but to complete this post, for those arriving now, I would like to mention that there is a component in Alfresco Addons that does this and more in a simple, intuitive and powerful way.
https://addons.alfresco.com/addons/alfresco-metadbconnector-component
I hope this helps the community.

Greetings!