cancel
Showing results for 
Search instead for 
Did you mean: 

Set (other) fielf mandatory from ftl template

wadsok
Champ in-the-making
Champ in-the-making
Is it possible to set other form field mandatory from JS in ftl template like:

      function updateChanges${field.name?substring(5)}() {
          window.alert("function started");
          var propertyList = ("${field.control.params.filteredProperty}").split(",");
          document.getElementById("${args.htmlid}_prop_" + propertyList[0]).mandatory= false;
         return false;
      }
This one doesn't work, but function gets called.
1 REPLY 1

sanket
Champ on-the-rise
Champ on-the-rise
You can use :
mandatory: ${field.mandatory?string}
Refer date.ftl file for reference. (Location - tomcat\webapps\share\WEB-INF\classes\alfresco\site-webscripts\org\alfresco\components\form\controls\date.ftl)