Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Click the  Edit icon for the Leave Approval Form to add the Leave Request section. You may notice the Employee Information section is collapsed in the images for this section.
  2. Drag and drop a Section control below the Employee Information section. Look for the green down arrow. Name it Leave Request.
  3. Drag a Date control from the palette and drop it into the Leave Request section. Change the label to Start Date. Change the width to 6 columns. Check the Required property.
  4. Drag a Number control from the palette and drop it into the Leave Request section to the right of Start Date. Change the label to Number of Days. Change the width to 6 columns. Check the Required property.
  5. Drag a Radio control from the palette and drop it under the Start Date field.
  6. Change the control label to Type of Leave, delete the default options, and add these choices for the options: Annual=Annual Leave, Floating Holiday=Floating Holiday, Sick=Sick Leave, Compensatory=Compensatory Leave, Other=Other Leave
  7. Check the comment box and specify 1 as the number of rows. Check the Required property.



  8. Click the Style tab and add a value of 30% to the Item Width. This changes the layout of the options from vertical to horizontal. 
     

     
  9. Create the Certification question that will appear when the employee checks the Sick Leave option by dragging a T/F control from the palette and dropping it below the Type of Leave control.
  10. Change the label to say "I certify that the above listed leave was entirely due to personal illness" and the name to Certification. Do not check the Required property for this control.
  11. Uncheck the Visible checkbox on the Certification field. This field is not visible on the form unless the Employee selects Sick Leave as the Type of Leave. This will be handled by a rule discussed later.
     


  12. Drag a Textarea control from the palette and drop it below the Type of Leave control inside the Leave Request section when you see the green down arrow. 
    Image Removed 
    Image Added
     
  13. Change the label to Comments. Do not check the Required property for this control.
    Image Removed 
    Image Added


  14. Select the section by clicking on its header.
  15. In the properties panel, select the Security Tab.
  16. You can set up this as a Signed Section. Two types of signatures are available from the Signature drop down: Text/Signature Image or Wet Signature. Here is information about the difference between the signature types. Select Text/Signature from the dropdown. 
  17. Check the Must Sign checkbox to require the signature and verify that the Lock checkbox is checked to prevent tampering with the signed data .
  18. Notice that a "Sign this section" button and a  pencil icon with a line appear at the bottom right and left of the section when the signature type is selected. 
    Image Removed 
    Image Added


  19. The Employee will have to sign the section before it can be submitted. 
  20. Click the  Save and exit icon to save work you have done so far.

...

We will add one business rule to show/hide the Certification control if the employee checks the Sick option in the Type of Leave dropdown. Follow these steps:

  1. Click the   Image ModifiedEdit icon for the Leave Approval Form. 

  2. Click on the Rules icon in the designer toolbar. 
    Image Removed
    Image Added 
  3. Click the plus icon to Create a new rule.
  4. Change the name of the rule to Sick Certification.
  5. Copy/Paste the rule below into the Rule box. 
Code Block
if (TypeOfLeave.value === 'Sick') {
  Certification.visible = true;
  Certification.required = true;
} else {
  Certification.visible = false;
  Certification.required = false;
}


Image RemovedImage Added

     6. Click the Image Modified Save and exit icon to save the rule and the form.          

Test the Leave Approval Form

  1. Click the   Test icon. 
    Image Removed
    Image Added

  2. Fill in the information in the Employee Information and Leave Request sections. Notice that you must fill in all required fields and that all fields must contain valid data. For example, the image shows an empty required field (Manager Id) and an incomplete email address displayed with an orange background. The user must correct these issues before the form can be submitted.



  3. Check Sick for the Type of Leave.
  4. Verify that the Certification control displays when the Sick option is selected as the Type of Leave option and that it is hidden when any of the other choices are checked.
  5. Click the Sign this Section button to sign the form as the logged in user, in this case, the designer. 
  6. Correct any validation issues. Click submit.

...