Disable requirements by user or role

Relax field requirements for users by email or role

The examples below show how to disable requirement validation for all of your form fields, based on a list of user emails or Fulcrum roles.

Email:

ON('load-record', function(event) {
  var emails = ['john.doe@gmail.com', 'jane.doe@gmail.com'];
  if (CONTAINS(emails, EMAIL())) {
    DATANAMES().forEach(function(dataName) {
      SETREQUIRED(dataName, false);
    });
  }
});

Role:

ON('load-record', function(event) {
  if (ISROLE('Owner', 'Manager')) {
    DATANAMES().forEach(function(dataName) {
      SETREQUIRED(dataName, false);
    });
  }
});