@oneblink/apps-react
    Preparing search index...

    Type Alias OneBlinkFormBaseProps

    OneBlinkFormBaseProps: OneBlinkReadOnlyFormProps & {
        abnLookupAuthenticationGuid?: string;
        attachmentRetentionInDays?: number;
        buttons?: FormsListStyles["buttons"];
        captchaSiteKey?: string;
        captchaType?: CaptchaType;
        disabled?: boolean;
        getCurrentSubmissionDuration?: () => number;
        handleNavigateAway?: () => unknown;
        isInfoPage?: "YES" | "NO" | "CALCULATED";
        isPendingQueueEnabled: boolean;
        isPreview?: boolean;
        navigableValidationErrorsNotificationSettings?: {
            navigationTopOffset?: number;
            scrollableContainerId?: string;
        };
        onBeforeUnload?: (
            props: {
                definition: Form;
                lastElementUpdated: FormElement | undefined;
                submission: S3SubmissionData["submission"];
                submissionDuration: number | undefined;
            },
        ) => void;
        onCancel: () => unknown;
        onSaveDraft?: (newDraftSubmission: NewDraftSubmission) => unknown;
        onSubmit: (newFormSubmission: NewFormSubmission) => unknown;
        onUploadAttachment?: typeof uploadAttachment;
        scrollToTopOfPage?: boolean;
        shouldUseNavigableValidationErrorsNotification?: boolean;
        validationIcon?: FormsAppEnvironmentStyles["validationIcon"];
    }

    Type Declaration

    • OptionalabnLookupAuthenticationGuid?: string

      An ABN Lookup Authentication Guid. Required if the form contains a abn form element.

    • OptionalattachmentRetentionInDays?: number

      Number of days attachments are retained for.

    • Optionalbuttons?: FormsListStyles["buttons"]

      Change properties for certain buttons on the form.

    • OptionalcaptchaSiteKey?: string

      A reCAPTCHA Site Key. Required if the form contains a captcha form element.

    • OptionalcaptchaType?: CaptchaType

      Determines whether to use checkboxes or invisible recaptcha v2 for captcha elements. Defaults to "CHECKBOX"

    • Optionaldisabled?: boolean

      Whether the form is currently able to be submitted. False by default.

    • OptionalgetCurrentSubmissionDuration?: () => number

      The function to call when determining the current submission duration.

    • OptionalhandleNavigateAway?: () => unknown

      The function to call when the user needs to navigate away from the form. e.g. history.push

    • OptionalisInfoPage?: "YES" | "NO" | "CALCULATED"

      Determines whether the form is submittable or not. Info page type forms show a "Done" button instead of a "Submit" button. Defaults to "CALCULATED"

    • isPendingQueueEnabled: boolean

      If set to false, submission will be prevented while offline. If set to true, the user will be prompted to allow them to continue with attachments uploading in the background later.

    • OptionalisPreview?: boolean

      Whether the form is in preview mode. False by default.

    • OptionalnavigableValidationErrorsNotificationSettings?: { navigationTopOffset?: number; scrollableContainerId?: string }

      Various settings for the navigable validation errors notification

      • OptionalnavigationTopOffset?: number

        A pixel offset for validation error navigation markers. Use this to account for any headers your page might have. If not set, we will attempt to calculate the offset for you. Please note: Calculating this value is not supported when passing in a scrollableContainerId.

      • OptionalscrollableContainerId?: string

        The HTML Element ID of the scrollable container your form resides in. If not set, will scroll on the window.

    • OptionalonBeforeUnload?: (
          props: {
              definition: Form;
              lastElementUpdated: FormElement | undefined;
              submission: S3SubmissionData["submission"];
              submissionDuration: number | undefined;
          },
      ) => void

      The function to call when the window.beforeunload event occurs.

    • onCancel: () => unknown

      The function to call when the user cancels the form

    • OptionalonSaveDraft?: (newDraftSubmission: NewDraftSubmission) => unknown

      The function to call when the user wishes to save their submission data as a draft submission. If not specified, drafts cannot be saved. See NewDraftSubmission for the structure of the argument.

    • onSubmit: (newFormSubmission: NewFormSubmission) => unknown

      The function to call when the user submits the form with valid submission data. See NewFormSubmission for the structure of the argument.

    • OptionalonUploadAttachment?: typeof uploadAttachment

      The function to call when a user uploads an attachment through an element that allows attachment upload. See uploadAttachment for the structure of the argument and a sample function to be used.

    • OptionalscrollToTopOfPage?: boolean

      Whether to scroll to the top of the page when the user navigates to a new page. If false the window will scroll to the top of the page stepper. Defaults to false.

    • OptionalshouldUseNavigableValidationErrorsNotification?: boolean

      Whether the form should use a navigable validation errors notification, or a simple validation errors notification

      true
      
    • OptionalvalidationIcon?: FormsAppEnvironmentStyles["validationIcon"]

      Set a custom validation icon and accessible label.