Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

RequisitionListForm Container

Provides a form for creating or editing requisition list details including name and description.

Version: 1.0.0-beta4

Configuration

The RequisitionListForm container provides the following configuration options:

ParameterTypeReq?Description
modeRequisitionListFormModeYesSets the form mode to determine whether to create a new requisition list or update an existing one. Use ‘create’ for new lists and ‘update’ when modifying existing lists. Controls form behavior and validation rules.
requisitionListUidstringNoSpecifies the unique identifier for the requisition list being updated. Required when mode is ‘update’ to load and modify the existing list data from the backend.
defaultValuesRequisitionListFormValuesNoPre-populates form values for the requisition list. Use to prepopulate the form when creating from a template, duplicating an existing list, or restoring previously entered data.
onSuccessfunctionNoCallback function to handle successful form completion. Use to implement custom success handling, navigation, or notifications.
onErrorfunctionNoCallback function to handle errors when form submission fails. Use to implement custom error handling, logging, or user notifications.
onCancelfunctionYesCallback function to handle form cancellation when users cancel the form. Use to implement navigation back to the list view or close modal dialogs.

Slots

This container does not expose any customizable slots.

Usage

The following example demonstrates how to use the RequisitionListForm container:

import { render as provider } from '@dropins/storefront-requisition-list/render.js';
import { RequisitionListForm } from '@dropins/storefront-requisition-list/containers/RequisitionListForm.js';
await provider.render(RequisitionListForm, {
mode: mode,
onCancel: onCancel,
requisitionListUid: "abc-123",
})(block);