IEpilogue interface
đ Descriptionâ
Interface that describes the properties to define a form epilogue within a form definition. An epilogue can be used by runners (that support it) to show a closing message when a form is completed.
đ Type declarationâ
interface IEpilogue { context: Context | undefined;Readonly branch: string | undefined;Readonly title?: string;ReadonlyOptional description?: string;ReadonlyOptional image?: string;ReadonlyOptional video?: string;ReadonlyOptional button?: { label: string; url: string; target: "self" | "blank"; };ReadonlyOptional repeatable?: boolean;ReadonlyOptional redirectUrl?: string;ReadonlyOptional getRedirect?: () => string | undefined;FunctionOptional }
đī¸ Propertiesâ
đˇī¸ branch
â
Contains the branch identifier of the epilogue. This property is undefined
if the epilogue is not set for a certain branch. This is the case when the root epilogue is supplied.
Typeâ
string | undefined
đˇī¸ button
â
Contains an optional button with a hyperlink to show.
Typeâ
{
/* Specifies the label for the button. */
label: string;
/* Specifies the URL for the button. */
url: string;
/* Specifies if the button should open a new window/tab. */
target: "self" | "blank";
}
đˇī¸ context
â
Contains the Context
instance for the epilogue.
Typeâ
Context
| undefined
đˇī¸ description
â
Contains the description (supports markdown).
Typeâ
string
đˇī¸ image
â
Contains the URL of an image to show.
Typeâ
string
It is possible to embed images using Base64 encoding.
đˇī¸ redirectUrl
â
Contains an URL to redirect to when the form ends.
Typeâ
string
When this property is used, all other properties are ignored.
đˇī¸ repeatable
â
Contains if the form is repeatable. If set to true
a button will be shown to start a new form session.
Typeâ
boolean
đˇī¸ title
â
Contains the title (supports markdown).
Typeâ
string
đˇī¸ video
â
Contains the URL of a video to show. Currently, YouTube and Vimeo are supported. The shareable URL of the video needs to be supplied.
Typeâ
string
âļī¸ Functionsâ
đ§ getRedirect
â
Redirect helper function that is useful for retrieving the actual URL to redirect to when a redirectUrl
is set. Any variables used in the redirect URL are processed and the function returns a valid URL or undefined
if the URL is invalid.
Signatureâ
() => string | undefined
Return valueâ
Returns a valid URL or undefined
if the URL is invalid.