{{-- stacked: default false, giving BS3 form-horizontal (label-left, input-right grid) which matches every regular edit/create form in the app. Pass stacked to opt into a vertical form (labels above inputs), typically paired with x-form.row's stacked prop on each row. form_class layers additional classes on top of the layout default, if a caller needs one. --}} @props([ 'id' => null, 'title' => null, 'action' => null, 'submitToSelect2' => false, 'submit_label' => null, 'submit_class' => 'btn-primary', 'labelledby' => null, 'form_attrs' => '', 'form_class' => null, 'stacked' => false, ]) @php $submitLabel = $submit_label ?? trans('general.save'); $labelledById = $labelledby ?? ($id ? $id.'Label' : null); $onsubmit = $submitToSelect2 ? ' onsubmit="return false"' : ''; $saveButtonAttrs = $submitToSelect2 ? ' type="button" id="modal-save"' : ' type="submit"'; $formClass = trim(($stacked ? '' : 'form-horizontal').' '.($form_class ?? '')); @endphp @if ($id) @endif