<?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 access form fields value in a control component ? in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/how-to-access-form-fields-value-in-a-control-component/m-p/283102#M236232</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can get any form field of any form by "field generic id + id of field".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;e.g If your field is defined in form like &amp;lt;show id="myModel:customProp"&amp;gt;, then you can get this field in JS file with Dom.get(field generic id+"_prop_myModel_customProp").&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now "field generic id" you can set in form.lib.ftl file in hidden field, so that will be available on every form and you can use in any of your custom control.(in form.lib.ftl file, args.htmlid = field generic id).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So now you can get one field value to filter second field value.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Apr 2014 09:46:00 GMT</pubDate>
    <dc:creator>aaditvmajmudar</dc:creator>
    <dc:date>2014-04-09T09:46:00Z</dc:date>
    <item>
      <title>How to access form fields value in a control component ?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-access-form-fields-value-in-a-control-component/m-p/283099#M236229</link>
      <description>Hello,I have a form with many fields and a custom javascript object-finder for an association (this object is a subclass of Alfresco.ObjectFinder).Here the share-config-custom.xml :.&amp;lt;code&amp;gt;&amp;lt;appearance&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;field id=“xyz:textField" mandatory=“true" /&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;field id=“xyz:assocField" m</description>
      <pubDate>Fri, 04 Apr 2014 05:35:03 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-access-form-fields-value-in-a-control-component/m-p/283099#M236229</guid>
      <dc:creator>stondini</dc:creator>
      <dc:date>2014-04-04T05:35:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to access form fields value in a control component ?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-access-form-fields-value-in-a-control-component/m-p/283100#M236230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It would be more useful if you also suggest what you are trying to achieve. I mean why you are trying to reuse those form fields?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Apr 2014 06:45:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-access-form-fields-value-in-a-control-component/m-p/283100#M236230</guid>
      <dc:creator>mitpatoliya</dc:creator>
      <dc:date>2014-04-04T06:45:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to access form fields value in a control component ?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-access-form-fields-value-in-a-control-component/m-p/283101#M236231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;OK.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to use the values of the fields in the "modal" search box to set some filters.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For example, a form with two fields is shown.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;A user select a country in the first field and clicks the "select" button of the second field.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;A search box appears to select some documents filtered by the country.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It's a kind of contextual search. It depends on the values of the form fields.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Apr 2014 16:31:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-access-form-fields-value-in-a-control-component/m-p/283101#M236231</guid>
      <dc:creator>stondini</dc:creator>
      <dc:date>2014-04-04T16:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to access form fields value in a control component ?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-access-form-fields-value-in-a-control-component/m-p/283102#M236232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can get any form field of any form by "field generic id + id of field".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;e.g If your field is defined in form like &amp;lt;show id="myModel:customProp"&amp;gt;, then you can get this field in JS file with Dom.get(field generic id+"_prop_myModel_customProp").&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now "field generic id" you can set in form.lib.ftl file in hidden field, so that will be available on every form and you can use in any of your custom control.(in form.lib.ftl file, args.htmlid = field generic id).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So now you can get one field value to filter second field value.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Apr 2014 09:46:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-access-form-fields-value-in-a-control-component/m-p/283102#M236232</guid>
      <dc:creator>aaditvmajmudar</dc:creator>
      <dc:date>2014-04-09T09:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to access form fields value in a control component ?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-access-form-fields-value-in-a-control-component/m-p/283103#M236233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you for the response.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I already tested the way you mention.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The field id is something like "page_x002e_data-form_x002e_task-edit_x0023_default_assoc_myModel_customPropAssoc".&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;And the value of Dom.get(…) is null.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, I tried to debug and I found the field id should be "page_x002e_data-form_x002e_task-edit_x0023_default_assoc_myModel_customPropAssoc-cntrl" (notice the "-cntrl" postfix).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;With that id, the value is a html div element ant the inner html is like :&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;div id="page_x002e_data-form_x002e_task-edit_x0023_default_assoc_myModel_customPropAssoc-cntrl" class="object-finder"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;div id="page_x002e_data-form_x002e_task-edit_x0023_default_assoc_myModel_customPropAssoc-cntrl-currentValueDisplay" class="current-values object-finder-items"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;div&amp;gt;&amp;lt;img src="/share/res/components/images/filetypes/generic-file-16.png" width="16" alt="" title="PM-123"&amp;gt; &amp;lt;a href="/share/page/site/PM-123/document-details?nodeRef=workspace://SpacesStore/e5827519-5e22-4cac-8241-2c979474cbdd"&amp;gt;PM-123&amp;lt;/a&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/div&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/div&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&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;/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;BR /&gt;&lt;SPAN&gt;It's strange to use DOM to get a form field value instead of the Alfresco API no ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I need the "real" initial field value given by the server call (the "data model" returned by the server in json).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do know another way to do that ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;With the Alfresco client Javascript API for example ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Apr 2014 17:29:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-access-form-fields-value-in-a-control-component/m-p/283103#M236233</guid>
      <dc:creator>stondini</dc:creator>
      <dc:date>2014-04-09T17:29:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to access form fields value in a control component ?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-access-form-fields-value-in-a-control-component/m-p/283104#M236234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you want to get default value provided by JSON response for any association then you can check loadSelectedItems method in object-finder js file of that association component. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For any other field except association, you can get the value like above mentioned.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2014 11:23:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-access-form-fields-value-in-a-control-component/m-p/283104#M236234</guid>
      <dc:creator>aaditvmajmudar</dc:creator>
      <dc:date>2014-04-14T11:23:12Z</dc:date>
    </item>
  </channel>
</rss>

