cancel
Showing results for 
Search instead for 
Did you mean: 

dependant lists in webforms.

boneill
Star Contributor
Star Contributor
Hi All,

Is there a way to create associations between elements on a webform.  For example,  if a user selects a value of Blue from a colours element then a shades element shows all shades of blue, such as light blue, dark blue etc.  So the shades element values are dependant on the colours element selection.

Regards

Brian
4 REPLIES 4

pmonks
Star Contributor
Star Contributor
There's no support out-of-the-box for "chained" fields in a Web Form, but this is possible via custom Web Form widgets (see http://wiki.alfresco.com/wiki/Creating_XForms_Widgets).

Cheers,
Peter

boneill
Star Contributor
Star Contributor
Peter,

List B is dependant on what a user has selected in a previous list (List A).  I want List B to be dynamic, ie if a user selects a value from list A then that value is used as a key to populate list B.  So list B be must be built based on the selection from list a.  is that possible using widget authoring and could you explain how I would do it.  THis sort of thing was available in other ecm suites I have used but not sure if you can do this with webforms as I dont know if they submit anywhere when a user selects a value.

Regards

Brian

pmonks
Star Contributor
Star Contributor
Yes it is possible, but it requires two custom widgets rather than one - a "source" widget and a "target" widget, with the source widget notifying the target widget when it has changed in value, allowing it to do whatever needs to be done (eg. filtering out values from a dropdown).  Because the widgets in Web Forms are implemented using the Dojo toolkit (http://dojotoolkit.org/), all of the notification and display logic would be implemented on the client side using JS and Dojo, although that code might make AJAX calls back to the server (eg. to a Web Script that retrieves the filtered set of data to be displayed in the target widget, based on the selected value in the source widget).

Obviously this kind of exercise will require expertise with Javascript and Dojo, but the basic approach is not particularly complex and all of the core pieces are already in place (in large part courtesy of Dojo).

Cheers,
Peter

rsulliv1
Champ in-the-making
Champ in-the-making
Have you implemented anything or started working on your widget?

I'd like to see what documentation sources you used to get to your solution.

There aren't any alfresco dependent widget examples out there at all (at least none that I've found yet). Any information you can provide will benefit everyone!
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.