{{# @name Form @desc The form component. @param form_handle The form handle of the form you want to render. @param redirect Optionally set a link where the user should be redirected to after a successful submission #}} {{ if form_handle }} {{ form:create :in="form_handle" :class="class" js="alpine:form" attr:x-ref="form" x-data='@{"_redirect": null }' :redirect="redirect" }} {{# Use Laravel Precognition for live validation and submission. #}}
{{# Error notifications. #}} {{# Polite live notifications for screen readers only. #}} {{# Honeypot spam protection. #}} {{# Render various form sections. #}} {{ sections }}
{{ if display || instructions }} {{ if display }} {{ trans :key="display" }} {{ /if }} {{ if instructions }}

{{ trans :key="instructions" }}

{{ /if }}
{{ /if }} {{# Render the default-styled fields. #}} {{ %form:fields scope="field" }} {{ /%form:fields }}
{{ /sections }} {{# Submit button, disabled on processing. #}}
{{ partial:components/button as="button" button_type="button" :label="form_button_label" }} {{ slot:attributes }} @click.prevent="submit" :disabled="form.processing" :class="{ 'opacity-25 cursor-default': form.processing }" {{ /slot:attributes }} {{ /partial:components/button }}
{{ /form:create }} {{# Call in the Peak Tools Alpine Based Precognition Form Handler. #}} {{ partial:statamic-peak-tools::snippets/form_handler }} {{ /if }}