Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion docs/journeys/embedding.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ export type DataInjectionOptions = {
initialState?:
| Record<string, Record<string, unknown>>
| Record<string, unknown>[]
/** 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[]
}

Expand Down Expand Up @@ -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.
Expand Down
19 changes: 18 additions & 1 deletion docs/journeys/sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,11 @@ type DataInjectionOptions = {
initialState?:
| Record<string, Record<string, unknown>>
| Record<string, unknown>[]
/** 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[]
}

Expand Down Expand Up @@ -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.
Expand Down
19 changes: 18 additions & 1 deletion docs/journeys/web-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,11 @@ type DataInjectionOptions = {
initialState?:
| Record<string, Record<string, unknown>>
| Record<string, unknown>[]
/** 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[]
}

Expand Down Expand Up @@ -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 `<epilot-journey>` element.
Expand Down
Loading