Fejlesztőknek
Kezdj bele
Témák/Theme SDK/Modules/forms

forms

Ez az oldal még csak angolul érhető el.

Store forms: the merchant's published forms, the newsletter sign-up and the contact form.

Ezen az oldalon
import { … } from '@poltura/theme-sdk/forms';

Hooks

NameWhat it is
useStoreFormThe surrounding form's state and actions, for your own fields and buttons inside StoreForm.
useStoreFormFieldOne field of the surrounding form, for a control of your own.
useFormActionsThe actions that open a merchant's form in a dialog or side panel.
useNewsletterThe store's newsletter: whether it takes sign-ups and the wording to ask with.

Parts

NameWhat it is
FormFieldOne field of the surrounding form with its label, control, help and error; nothing while hidden.
FieldControlThe platform control of one field: input, text area, choices, checkbox, date or file picker.
SubmitButtonThe surrounding form's send button, which moves to the next step on multi-step forms.
FormTriggerA button that opens a published form in a dialog or side panel, loading it on hover.
FormPopupOpens a merchant's form by itself after a delay, as often as frequency allows; draws nothing.
NewsletterTriggerA button that opens the newsletter sign-up in a dialog or side panel; nothing when the newsletter is off.

Defaults

NameWhat it is
StoreFormA merchant's published form, drawn with its fields, steps, validation, captcha and success message.
NewsletterFormThe newsletter sign-up, inline, stacked, as the footer column or as a full-width band; nothing when it is off.
ContactFormThe store's contact form: name, email, subject and message, sent to the merchant's inbox.

Types

NameWhat it is
FormFieldTypeWhat a form field asks for, which decides the control it draws.
FormFieldOptionOne choice of a select, radio or multi-select field.
StoreFormFieldViewA field of a published form, already in the page language.
FormValueThe value of one field: text, a number, a ticked box or the picked choices.
StoreFormStatusWhere a form is in its life: loading, ready to fill in, missing, or sent.
StoreFormFileA file the shopper picked for a file field.
StoreFormTextsThe fixed wording of a form's buttons, in the page language.
StoreFormStateA published form with its values, errors and the actions that fill it in and send it.
StoreFormFieldStateOne field of the surrounding form, with its value and error.
StoreFormLayoutHow a form's fields sit: one under another, or two per row on wide screens.
StoreFormAppearanceThe surface a form draws on.
StoreFormChromeWhether a form draws its title, description and card, or only its fields.
StoreFormCopyThe theme's own wording for a form; empty values keep the merchant's.
StoreFormPropsProps of StoreForm.
FormFieldRenderWhat a FormField render function receives.
FormFieldPropsProps of FormField.
FieldControlPropsProps of FieldControl.
SubmitButtonPropsProps of SubmitButton.
FormDisplayWhether a form opens as a dialog or as a side panel.
FormWidthHow wide an opened form is.
OpenFormInputA form to open in a dialog or side panel.
FormActionsThe actions that open a published form over the page.
FormTriggerPropsProps of FormTrigger.
FormPopupFrequencyHow often a form that opens by itself opens again for one visitor: once ever, once a session, or after 30 days.
FormPopupPropsProps of FormPopup.
NewsletterTextsThe newsletter wording, from the theme settings over the platform's own, and the store's consent sentence.
NewsletterStateWhether the store takes newsletter sign-ups, and the wording to ask with.
NewsletterLayoutWhere a newsletter form sits, which decides its look.
NewsletterFormPropsProps of NewsletterForm.
NewsletterTriggerPropsProps of NewsletterTrigger.
ContactFormPropsProps of ContactForm; every wording falls back to the platform's own.
Utoljára frissítve