From 77c0ecbcf46ca34c21b9b174a24cf54169f33afb Mon Sep 17 00:00:00 2001 From: Adeola Adeyemo Date: Thu, 18 Jun 2026 12:17:58 +0000 Subject: [PATCH] docs(journeys): document read-only block-type support Read-only via blocksDisplaySettings (type: 'DISABLED') is currently supported only for Personal Information, Address, Availability Check, and Text Input. Note the supported block types in the DataInjectionOptions type and add a "Making blocks read-only" section to the SDK, web component, and legacy embedding docs. Co-Authored-By: Claude --- docs/journeys/embedding.md | 19 ++++++++++++++++++- docs/journeys/sdk.md | 19 ++++++++++++++++++- docs/journeys/web-components.md | 19 ++++++++++++++++++- 3 files changed, 54 insertions(+), 3 deletions(-) diff --git a/docs/journeys/embedding.md b/docs/journeys/embedding.md index 746c568..4bdd25d 100644 --- a/docs/journeys/embedding.md +++ b/docs/journeys/embedding.md @@ -60,7 +60,11 @@ export type DataInjectionOptions = { initialState?: | Record> | Record[] - /** the display options to be passed to the journey, for now it is used to disable some fields */ + /** + * the display options to be passed to the journey — used to render blocks (or + * specific fields) read-only. read-only is currently supported only for these + * block types: Personal Information, Address, Availability Check, and Text Input. + */ blocksDisplaySettings?: BlockDisplaySetting[] } @@ -104,6 +108,19 @@ __epilot.init([ With the block-ID form you only list the blocks you actually want to prefill — there is no need to pad earlier steps with empty objects, and the mapping is unaffected by block renames or step reordering. To find a block's ID, open the block configurator in the Journey builder. +### Making blocks read-only + +`blocksDisplaySettings` renders a block — or specific fields within it — as read-only: the prefilled values are shown but the end customer can't edit them. Each entry sets `type: 'DISABLED'` and targets a block by its stable `blockId` (recommended); add `blockFields` to lock only certain fields instead of the whole block. + +Read-only is currently supported only for these block types: + +- **Personal Information** +- **Address** +- **Availability Check** +- **Text Input** + +Other block types don't support read-only. + ### Data Injection builder (preview) You don't have to hand-write block IDs. The Journey Builder includes a **Data Injection (preview)** tool that lets you build the configuration visually: pick the blocks and fields to prefill, set their pre-fill values, mark blocks as read-only, choose the starting step, then copy the generated snippet straight into your `__epilot.init()` call. diff --git a/docs/journeys/sdk.md b/docs/journeys/sdk.md index 8a90095..2166b67 100644 --- a/docs/journeys/sdk.md +++ b/docs/journeys/sdk.md @@ -510,7 +510,11 @@ type DataInjectionOptions = { initialState?: | Record> | Record[] - /** Control which blocks/fields are disabled */ + /** + * Control which blocks are disabled (rendered read-only). Read-only is + * currently supported only for these block types: Personal Information, + * Address, Availability Check, and Text Input. + */ blocksDisplaySettings?: BlockDisplaySetting[] } @@ -559,6 +563,19 @@ The same `.dataInjectionOptions({ ... })` call works with either backend — swa The recommended form keys `initialState` by **block ID**. Each entry is an object of the field values for that block. Because the state is keyed by block ID, you only list the blocks you actually want to prefill — no per-step ordering or empty `{}` placeholders are needed, and the mapping is unaffected by block renames or step reordering. To find a block's ID, open the block configurator in the Journey builder. +### Making blocks read-only + +`blocksDisplaySettings` renders a block — or specific fields within it — as read-only: the prefilled values are shown but the end customer can't edit them. Each entry sets `type: 'DISABLED'` and targets a block by its stable `blockId` (recommended); add `blockFields` to lock only certain fields instead of the whole block. + +Read-only is currently supported only for these block types: + +- **Personal Information** +- **Address** +- **Availability Check** +- **Text Input** + +Other block types don't support read-only. + ### Data Injection Options builder You don't have to hand-write block IDs. The Journey Builder includes a **Data Injection (preview)** tool that lets you build the configuration visually: pick the blocks and fields to prefill, set their pre-fill values, mark blocks as read-only, choose the starting step, then copy the generated options straight into your `.dataInjectionOptions()` call. diff --git a/docs/journeys/web-components.md b/docs/journeys/web-components.md index fceb846..4ba792a 100644 --- a/docs/journeys/web-components.md +++ b/docs/journeys/web-components.md @@ -193,7 +193,11 @@ type DataInjectionOptions = { initialState?: | Record> | Record[] - /** Control which blocks/fields are disabled */ + /** + * Control which blocks are disabled (rendered read-only). Read-only is + * currently supported only for these block types: Personal Information, + * Address, Availability Check, and Text Input. + */ blocksDisplaySettings?: BlockDisplaySetting[] } @@ -250,6 +254,19 @@ el.setAttribute( The recommended form keys `initialState` by **block ID**. Each entry is an object of the field values for that block. Because the state is keyed by block ID, you only list the blocks you actually want to prefill — no per-step ordering or empty `{}` placeholders are needed, and the mapping is unaffected by block renames or step reordering. +### Making blocks read-only + +`blocksDisplaySettings` renders a block — or specific fields within it — as read-only: the prefilled values are shown but the end customer can't edit them. Each entry sets `type: 'DISABLED'` and targets a block by its stable `blockId` (recommended); add `blockFields` to lock only certain fields instead of the whole block. + +Read-only is currently supported only for these block types: + +- **Personal Information** +- **Address** +- **Availability Check** +- **Text Input** + +Other block types don't support read-only. + ### Data Injection builder (preview) You don't have to hand-write block IDs. The Journey Builder includes a **Data Injection (preview)** tool that lets you build the configuration visually: pick the blocks and fields to prefill, set their pre-fill values, mark blocks as read-only, choose the starting step, then copy the generated `data-injection-options` snippet straight onto your `` element.