cancel
Showing results for 
Search instead for 
Did you mean: 

Ideas on Dynamic population in web forms?

rsulliv1
Champ in-the-making
Champ in-the-making
Hey all,

I was wondering if anyone could lend some ideas on how to accomplish the following:

populate multiple textareas based on the selection of a single drop-down list.

More detail:

There would be content of a certain content type (i.e., sm:sample).
The content of that type would be xml populated by a regular non-wcm form (not an issue here).
content example:
<root>
  <data1>data1</data1>
  <data2>data2</data2>
  <data3>data3</data3>
</root>

Then, during the creation of wcm content via a wcm form, all titles of the sm:sample content will be available in the ddl (I can accomplish this).
The user selects an option from the ddl, then three separate read-only textareas are populated.
textarea1 populated with the content of data1
textarea2 populated with the content of data2
textarea3 populated with the content of data3

I've read through the alfresco wiki's wcm form pages & as many forum pages as possible. I've also followed Dr. Q's form workshop (http://drquyong.com/myblog/?p=156). Dr. Q's tutorial was immensely more informative than anything I found from an Alfresco-based site.

Perhaps I'm not finding the right information?

Dr. Q's tutorial showed me how to use web scripts to populate form elements & populate read-only forms, but the pre-populated form was not dependently driven from another form element. I believe what I want to accomplish is possible, but I can't seem to find this last piece.

Thanks for any help!
2 REPLIES 2

kmehta31
Champ in-the-making
Champ in-the-making
Hi,

As you know, WCM web form is to create the content by defining XSD and applying templates.
However it doesnt have kind of behavior you are talking about. You can still include the dynamic values by various approaches (webscript, jsp etc.)
and use the values in your schema definition by import/include functionality…
However it doesnt have behaviour like change the values of dropdown Out of the box…unless u modify the implementation.

For more info…you need to see the Chiba implementation and do some custom coding…

rsulliv1
Champ in-the-making
Champ in-the-making
My fault, I should have updated this post. I actually did accomplish what I was going for by creating custom dojo widgets and incorporating them into alfresco.

I detailed the process here: http://ecmconsultant.blogspot.com/

Thanks for the reply!
-ryan