Advanced Tips for Custom Forms

The Custom Forms module in HR Partner has a lot of power under the hood.  As well as collecting information from your employees or applicants, you can also use them to automatically update core employee information in the system, as well as update employee custom fields that you have set up.  In this article, we will show you how to do this.

Updating Core Employee Fields

You can use Custom Forms to update any of the following employee information in HR Partner:

  • First Name(s)
  • Last Name
  • Salutation
  • Birth Date
  • Tax Identifier (TFN/SSN/National ID)

To set up the automatic update, you will need to ensure that you set up your field names in the form template to be one of the following:

To Set This Employee Field Use This Field Name
First Name(s) employee__first_name or employee__first_names
Last Name employee__last_name or employee__surname
Salutation employee__salutation
Birth Date employee__date_of_birth or employee__birthdate
Tax Number employee__tax_number or employee__ssn or employee__tfn

Please note that the special field names all begin with 'employee__' which is the word 'employee' followed by TWO underscore '_' characters in succession, then the rest of the field name (see below):

Updating Custom Fields

You can also use Custom Forms to update any custom fields that you might have set up in your HR Partner company for your employees.  In a lot of cases, customers will create custom fields to hold information such as the employee's bank details etc., so we now you can set these fields up, then simply ask your employees to fill in this information themselves without having to come through you.

When you set up custom fields under Setup -> Configure -> Custom Fields, you have to give each field a unique name:

All you need to do is to use the SAME field name in your custom form, and the information will be automatically updated in the employee's custom field when they submit the form to you!  For example:

That's it! Nothing else to do.  Our system will recognize if a field name matches a custom field, and we will update it automatically.  The only thing you need to be aware of is that the field type matches in the custom form and the custom fields area (e.g. a custom date field must be set up as a Date type field in the custom form etc.)

Custom Formats For Your Form

Did you know that you have quite comprehensive styling available for your forms?  You can change the color and fonts etc. to really suit your corporate style if you wish.  Here is an example of an extensively styled form which was done with only a handful of custom CSS:

Here is the custom CSS which was entered into Forms -> Configure -> Form Layout:

.cf-form-area {
  background-color: ivory;
  font-size: 1.5em;
  font-family: "Georgia";
}


.cf-notification-area {
  background-color: palegoldenrod;
}


.form-control {
  background-color: azure;
}


.cf-submit-button {
  background-color: mediumvioletred;
}
<br>
Here is a much more complex example that you can achieve (complete with a CSS pattern background):

And below is the CSS that gives you this result:
.cf-body {
  background-color: #553c7a;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='12' viewBox='0 0 20 12'%3E%3Cg fill-rule='evenodd'%3E%3Cg id='charlie-brown' fill='%237b939a' fill-opacity='0.4'%3E%3Cpath d='M9.8 12L0 2.2V.8l10 10 10-10v1.4L10.2 12h-.4zm-4 0L0 6.2V4.8L7.2 12H5.8zm8.4 0L20 6.2V4.8L12.8 12h1.4zM9.8 0l.2.2.2-.2h-.4zm-4 0L10 4.2 14.2 0h-1.4L10 2.8 7.2 0H5.8z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}


.cf-form-area {
  background-color: cornflowerblue;
  color: white;
}


.cf-notification-area {
  background-color: palegoldenrod;
}


.form-control {
  background-color: linen;
  color: purple;
  font-size: 1.25em;
}
<br>
If you want to know the HTML DIV elements which have custom classes that you can style, all the DIVs with a ' cf-' prefix class are shown below:

Please note that you have to have fairly competent knowledge of CSS formatting in order to make changes to your forms which will not break them.  We take no responsibility if any non-standard changes cause your forms not to display or work properly.  If in doubt, please reach out to our support team.