cancel
Showing results for 
Search instead for 
Did you mean: 

Define custom variable for form config

alex_lu
Champ in-the-making
Champ in-the-making
Hi,

In share-datalist-form-config.xml, I see


<field id="dl:attachments">
   <control>
      <control-param name="startLocation">{doclib}</control-param>
   </control>
</field>


defined for dl:todoList.

Does anyone where doclib is set? I would like to set a custom variable to be used in form config.

Thanks
3 REPLIES 3

scouil
Star Contributor
Star Contributor
Hello Alex,

Are you trying to add a general parameter for the form config or just a new location variable for the startLocation param of the association.ftl control?
If it's the latter, its detailed configuration (http://wiki.alfresco.com/wiki/Forms#association.ftl) specifies that you can easily add your location by defining a custom NodeLocatorService (http://wiki.alfresco.com/wiki/NodeLocatorService)

Good luck with your customization.

alex_lu
Champ in-the-making
Champ in-the-making
Hi Scouil,

I'd like to add a general parameter for the form config actually. But thanks for node locator, I'm sure I'll need it soon.

scouil
Star Contributor
Star Contributor
Hi Alex,

Then I'd need to know a bit more about what you're trying to do here.
Since there are 2 types of params I'm aware of:
1) The ones like "form.mode" that are injected in the form and handled by freemarker
2) The ones like the startLocation described in your comment. This one is just a string and is handled by the component itself (picker.inc.ftl  which then calls  object-finder.js )

Regards,