{{-- Single custom field input. Included from contact-form.blade.php once for every CustomField row (both for ungrouped fields at the top of the form and for fields inside a collapsible
group). Receives one variable: $field — App\Models\CustomField Reads/writes $customFieldValues[$field->key] on the Livewire ContactForm component. --}}
@php // Resolve once so each branch can use them without re-touching $field. $key = $field->key; $placeholder = $field->placeholder ?: ''; @endphp @if($field->type === 'dropdown' && $field->options) @elseif($field->type === 'multi_select' && $field->options) {{-- Native multi-select. Wire-bound to a PHP array; Livewire keeps the array in sync as the user picks/unpicks options. size=4 keeps the box compact even for long option lists. --}}

{{ __('Hold Ctrl (⌘ on Mac) to select multiple.') }}

@elseif($field->type === 'checkbox') @elseif($field->type === 'long_text') @else @endif {{-- Parent-level error catches "required but unselected" on multi_select (array|min:1) AND scalar validation failures. Individual sub-element errors (e.g. one option > 255 chars) would land at `customFieldValues.{key}.0` — @error can't wildcard those, so we rely on the parent message. --}} @error("customFieldValues.{$field->key}")

{{ $message }}

@enderror