<?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: Add fields dynamically in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/add-fields-dynamically/m-p/25945#M11240</link>
    <description>&lt;P&gt;Yes, you can do this using javascript. The bad news: it is cumbersome.&lt;/P&gt;&lt;P&gt;Basically you need to manipulate the form definition from javascript. The best way to do it is by listening to the FormRendered event which passes the AngularJS scope and form. You have to create the JSON for containers and fields and pass all your generated fields into&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;scope&lt;/SPAN&gt;.&lt;SPAN&gt;allFormFields&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;Then, you need to pass your containers (in case you add a new container) to&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;form&lt;/SPAN&gt;.&lt;SPAN&gt;fields&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;or simply to the column of an existing container (in case you don't create a container of your own to hold the fields). Anyways make always sure, that your generated JSON is correct.&lt;/P&gt;&lt;P&gt;Also, this approach does not support saving the form (at least not your dynamically added fields). To do that, you will need some hack to accieve this, like saving all properties into a hidden text field that holds all your values or manually use task variables which are also not that easy to do...&lt;/P&gt;&lt;P&gt;Good luck!&lt;/P&gt;&lt;P&gt;Manuel&lt;/P&gt;</description>
    <pubDate>Wed, 05 Feb 2020 15:39:04 GMT</pubDate>
    <dc:creator>messmeister</dc:creator>
    <dc:date>2020-02-05T15:39:04Z</dc:date>
    <item>
      <title>Add fields dynamically</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/add-fields-dynamically/m-p/25943#M11238</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Is it possibe add dynamically field to a APS form using javascript events.&lt;/P&gt;&lt;P&gt;My need is the following:&lt;/P&gt;&lt;P&gt;I have a form that contains people field (validator1). Once the user fill this field we want to add dynamically another people field (validator2) in the form.&amp;nbsp;Once the user fill validator2 field we want to add dynamically another people field (validator3) in the form...&lt;/P&gt;&lt;P&gt;Best Regards,&lt;BR /&gt;Makram&lt;/P&gt;</description>
      <pubDate>Tue, 17 Dec 2019 07:29:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/add-fields-dynamically/m-p/25943#M11238</guid>
      <dc:creator>makram_baaziz</dc:creator>
      <dc:date>2019-12-17T07:29:21Z</dc:date>
    </item>
    <item>
      <title>Re: Add fields dynamically</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/add-fields-dynamically/m-p/25944#M11239</link>
      <description>&lt;P&gt;You can use visibility condition for the field, if validation1 if filled show the second validation2 and so on.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2020 12:42:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/add-fields-dynamically/m-p/25944#M11239</guid>
      <dc:creator>amruta_w</dc:creator>
      <dc:date>2020-02-03T12:42:31Z</dc:date>
    </item>
    <item>
      <title>, Re: Add fields dynamically</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/add-fields-dynamically/m-p/25945#M11240</link>
      <description>&lt;P&gt;Yes, you can do this using javascript. The bad news: it is cumbersome.&lt;/P&gt;&lt;P&gt;Basically you need to manipulate the form definition from javascript. The best way to do it is by listening to the FormRendered event which passes the AngularJS scope and form. You have to create the JSON for containers and fields and pass all your generated fields into&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;scope&lt;/SPAN&gt;.&lt;SPAN&gt;allFormFields&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;Then, you need to pass your containers (in case you add a new container) to&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;form&lt;/SPAN&gt;.&lt;SPAN&gt;fields&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;or simply to the column of an existing container (in case you don't create a container of your own to hold the fields). Anyways make always sure, that your generated JSON is correct.&lt;/P&gt;&lt;P&gt;Also, this approach does not support saving the form (at least not your dynamically added fields). To do that, you will need some hack to accieve this, like saving all properties into a hidden text field that holds all your values or manually use task variables which are also not that easy to do...&lt;/P&gt;&lt;P&gt;Good luck!&lt;/P&gt;&lt;P&gt;Manuel&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2020 15:39:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/add-fields-dynamically/m-p/25945#M11240</guid>
      <dc:creator>messmeister</dc:creator>
      <dc:date>2020-02-05T15:39:04Z</dc:date>
    </item>
  </channel>
</rss>

