Field Interactions

Field interactions run a custom script when a field on a form loads, changes, gains focus or loses focus. You can use them on entity fields and on custom object fields.

Field interaction scripts are written in JavaScript, so you'll need a developer who knows JavaScript. To manage field interactions, you need the Account Administration and Administer Field Interactions entitlements. Contact Bullhorn Support to turn on these entitlements.

Bullhorn Support can't build or fix field interactions for you.

Accessing Field Interactions

Field interactions are managed on each field's edit page in Field Mappings.

  1. From your Bullhorn menu, select Admin > Field Mappings.

  2. Select the entity, then select the field name or its pencil icon . The field's edit page opens.

  3. Scroll to the Field Interactions section. It lists the field's interactions with their settings.

Adding a Field Interaction

  1. In the Field Interactions section, select Add Interaction.

  2. Fill in the settings:

    • Name: A name for the interaction.

    • Event: When the script runs: On Change, On Blur, On Focus or On Init. See Event Types below.

    • Sort Order: The order this field's interactions run in. Must be a whole number.

    • Run on Init: Also runs the script once when the form loads.

    • Enabled: Only enabled interactions run. Uncheck this to turn an interaction off without deleting it.

    • Script: The JavaScript to run, up to 100,000 characters.

  3. Click Save.

The Field Interactions section has its own Save button. Saving the field's other settings doesn't save your interaction changes.

To edit an interaction, select its pencil icon. To delete one, select its delete icon, then confirm.

Event Types

Each interaction runs on one event. Pick the event based on when the script should run.

Event Use it to Runs when

On Change

Check a value, calculate another field, or show or hide fields based on the value.

The field's value changes. This includes a value typed by a user and a value set by another interaction. The script runs about 0.3 seconds after the last change.

On Blur

Check a value once the user has finished typing, or ask the user to confirm a change.

The user leaves the field by clicking somewhere else or pressing Tab. The script runs about 0.3 seconds later.

On Focus

Show a tip or reminder about what to enter.

The user clicks or tabs into the field. The script runs about 0.3 seconds later.

On Init

Set up the form, such as making fields read-only for some user types, hiding fields, or filling in a default value.

The form opens. The script runs once. Run on Init turns on by itself for this event.

Run on Init with other events: If you turn on Run on Init for an On Change, On Blur or On Focus interaction, the script runs once when the form opens and again each time the event happens. Use this when the form should be right as soon as it opens. For example, hide a field based on a value that's already saved, and again whenever the value changes.

How Field Interactions Work

  • Add and edit forms: Field interactions run on add and edit forms.

  • Form load: Interactions load when the form opens and the field is on it. If a field is hidden in Field Mappings, its interactions don't load.

  • When changes apply: A new or changed interaction runs the next time a form loads. Reopen or reload the form to test it.

  • Saved fields only: The Field Interactions section only shows for fields that have been saved at least once.

  • Field dependencies: An interaction can change other fields on the same form. For example, it can fill in or lock a field based on a value entered in another field.

  • Event types: Each interaction runs on one event: On Change, On Blur, On Focus or On Init. See Event Types above.

Examples of Field Interactions

  • Simple field validations. Example: checking that an email address has an @ and a period.

  • Changing how information is displayed. Example: making fields read-only for selected user types, or hiding fields based on values in other fields.

  • Custom calculations. Example: adding the amounts in two fields and filling in a third field with the total.

  • Messages to users. Example: showing a tip under a field, a tooltip, or a pop-up message.

For scripts and examples, see the Novo Elements field interaction docs.

Mobile App Support

Most field interactions work in the Bullhorn mobile app. Some may not work as expected because the mobile screens are different. Test each interaction on mobile before you tell users about it.

Limiting an Interaction to Desktop Only

To run a field interaction only in the Bullhorn web app and not in the mobile app, wrap the interaction code in this if statement:

Copy
if (API.globals.platform !== "MOBILE") {
    // existing interaction
}

The check runs each time the interaction runs. In the mobile app, the interaction is skipped. In a web browser, it runs as normal.

Developer Assistance

Many of our Systems Integration partners can help build field interactions. To find them, go to our Marketplace Partner Listing and filter by the Implement & Integrate category.

Bullhorn Professional Services can also build field interactions as a paid customization. Contact your account manager to learn more.