Skip to main content

Hiding Form Fields

How can we hide prefilled form fields?

When you prefill values via Prefilling Campaign Order Form recipe, you will most likely want to hide the steps so the end user does not need to see and enter/read the prefilled values. For that you would need to hide the entire step using Disabling Order Journey Steps.


In some cases you may prefill some steps partially and want to hide some fields in a particular step. To do that the value should be valid. After prefilling, let's see an example on how to hide Address Line 1 of Working Location step:

const addressLine1Selector = '.hapi__card-campaign-create-form-working-location-address-line1'

window.hapi.ui.service.hideElement(addressLine1Selector)