AnsweredAssumed Answered

Custom Action only for certain types

Question asked by dave984 on Feb 3, 2014
Following the tutorial( i've succesfully implemented the "Send as email" action in Share.
It works on every single file…my goal now is activate the send as email action, depending on the type of the document, with different fields and controls in the box displated. So if the document is type A the form will be to,subject,body(default), if document is type B the form will have why,when, where fiels and so on…
The code for the action in share-custom-config.xaml is:

<config evaluator="string-compare" condition="send-as-email">
                    <show id="to"/>
                    <show id="subject"/>
                    <show id="body_text"/>
                    <show id="to2"/>
                    <show id="subject2"/>
                    <show id="body_text2"/>
                    <field id="to" label-id="">
                       <control template="/org/alfresco/components/form/controls/checkbox.ftl" />
                    <field id="subject" label-id="send-as-email.field.subject"/>
                    <field id="body_text" label-id="send-as-email.field.body_text">
                        <control template="/org/alfresco/components/form/controls/textarea.ftl" />
                    <field id="to2" label-id="send-as-email.field.to2">
                       <control template="/org/alfresco/components/form/controls/selectone.ftl">
                          <control-param name="options">1|First,2|Second,3|Third,4|Fourth</control-param>
                    <field id="subject2" label-id="send-as-email.field.subject2"/>
                    <field id="body_text2" label-id="send-as-email.field.body_text2">
                        <control template="/org/alfresco/components/form/controls/textarea.ftl" />

Is there a way to add another condition on the type of the document?