<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to get form fields values from share-config-custom.xml in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/how-to-get-form-fields-values-from-share-config-custom-xml/m-p/238641#M191771</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you for such informative reply. Here is my situation: I have both "node-type" and "model-type" evaluator sections in my config, but &lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;scopedRoot["forms"]&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt; returns forms only for "model-type". I.e. if I have form with some id only in node-type section I cant get it. How can I do this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Feb 2014 06:33:05 GMT</pubDate>
    <dc:creator>alhol</dc:creator>
    <dc:date>2014-02-28T06:33:05Z</dc:date>
    <item>
      <title>How to get form fields values from share-config-custom.xml</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-get-form-fields-values-from-share-config-custom-xml/m-p/238638#M191768</link>
      <description>Hi,I need to get fields from share-config-custom.xml.Below is what did:[b]File name: rmsearch.get.js[/b][b]Created a method called getFormFields()[/b]function&amp;nbsp; getFormFields(){var&amp;nbsp; scopedRoot = config.scoped["cm:content"]["forms"]["form"];var configs = scopedRoot.getChildren("appearance");………}‍‍‍‍‍‍</description>
      <pubDate>Fri, 22 Oct 2010 08:52:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-get-form-fields-values-from-share-config-custom-xml/m-p/238638#M191768</guid>
      <dc:creator>croc</dc:creator>
      <dc:date>2010-10-22T08:52:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to get form fields values from share-config-custom.xml</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-get-form-fields-values-from-share-config-custom-xml/m-p/238639#M191769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Try using the following instead…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;var&amp;nbsp; scopedRoot = config.scoped["cm:content"]["forms"].childrenMap["form"];&lt;BR /&gt;var configs = scopedRoot.getChildren("appearance");&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Oct 2010 13:42:52 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-get-form-fields-values-from-share-config-custom-xml/m-p/238639#M191769</guid>
      <dc:creator>gavinc</dc:creator>
      <dc:date>2010-10-22T13:42:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to get form fields values from share-config-custom.xml</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-get-form-fields-values-from-share-config-custom-xml/m-p/238640#M191770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Apologies, the code I suggested above won't work either. The forms configuration uses specific ConfigElement implementations, not the generic ones (GenericConfigElement), therefore getChildren() and getChildrenMap() won't return anything.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not sure from your example what information you are trying to retrieve, the code below will allow you to get a list of fields that will be editable in edit mode.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;var scopedRoot = config.scoped["cm:content"];&lt;BR /&gt;var forms = scopedRoot["forms"];&lt;BR /&gt;var form = forms.defaultForm;&lt;BR /&gt;var visibleFields = form.visibleEditFieldNames;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;The object you get back from scopedRoot["forms"] is org.alfresco.web.config.forms.FormsConfigElement you can have a look at it to see what methods are available to you, in the example above I have used getDefaultForm(). The object you then get back is org.alfresco.web.config.forms.FormConfigElement, this has quite a few methods you can call to get config information, in the example above i've used getVisibleEditFieldNames().&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Oct 2010 10:14:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-get-form-fields-values-from-share-config-custom-xml/m-p/238640#M191770</guid>
      <dc:creator>gavinc</dc:creator>
      <dc:date>2010-10-23T10:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to get form fields values from share-config-custom.xml</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-get-form-fields-values-from-share-config-custom-xml/m-p/238641#M191771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you for such informative reply. Here is my situation: I have both "node-type" and "model-type" evaluator sections in my config, but &lt;/SPAN&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;scopedRoot["forms"]&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt; returns forms only for "model-type". I.e. if I have form with some id only in node-type section I cant get it. How can I do this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Feb 2014 06:33:05 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-get-form-fields-values-from-share-config-custom-xml/m-p/238641#M191771</guid>
      <dc:creator>alhol</dc:creator>
      <dc:date>2014-02-28T06:33:05Z</dc:date>
    </item>
  </channel>
</rss>

