Ask questions about installing and configuring ProcessMaker 3
By Artonbajrami
#813119
Hi Team,
Im creating the Danyform i want to make it so when user picks Student on the dropdown list, the Student Start Date and Student End Date to be Required
and the Student Start Date to be Before the Student End Date

Thank you
emp.PNG
emp.PNG (6.85 KiB) Viewed 3919 times
User avatar
By amosbatto
#813121
In the properties of studentStartDate and studentEndDate, mark the "required" property. Then add the following JavaScript to your dynaform:
Code: Select all
//changes studentStartDate and studentEndDate to required or not required depending on employeeStatus
function changeRequiredDates(employeeStatus, oldVal) {
   if (employeeStatus == 'student') {
       $("#studentStartDate").enableValidation();
       $("#studentEndDate").enableValidation();
   }
   else {
       $("#studentStartDate").disableValidation();
       $("#studentEndDate").disableValidation();
   }
}
changeRequiredDates($("#studentStatus").getValue(), '');  //when Dynaform loads

$("#studentStatus").setOnchange(changeRequiredDates);
 

You will have the change the IDs to match those used in your DynaForm. See:
http://wiki.processmaker.com/3.1/JavaSc ... Validation
http://wiki.processmaker.com/3.1/JavaSc ... etOnchange

A 1xBet clone script is a customizable software so[…]

A Bustabit clone script is a pre-made software sol[…]

Are you looking for ways to pay someone to write m[…]

BC.Game Clone

BC.game clone is a replica of the original BC.game[…]