HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/SBogers10/csb.komma.pro/resources/views/components/form/select.blade.php
@extends('components.form.layout.element')

@section('form-element-area-' . $formElementCodeName)

    <div class="c-select js-{{$formElementCodeName}}-select-wrapper">
        <select class="c-select__field"
                id="{{$formElementCodeName}}"
                name="{{$formElementCodeName}}"
                data-test="{{$formElementCodeName}}"
        >

            @if(isset($formElementDisableNullOption) && $formElementDisableNullOption)
                <option value="null" disabled="disabled"
                        @if((isset($formElementValue) && $formElementValue == null ) || \Illuminate\Support\Facades\Request::old($formElementCodeName, null) == null ) selected="selected" @endif >{{ isset($formElementPlaceholder) ? $formElementPlaceholder : __('site/form.'.$formElementCodeName.'.placeholder') }}</option>
            @endif

            @if(!empty($formElementOptions))
                @foreach($formElementOptions as $key => $value)

                    @if(is_iterable($value))
                        <optgroup label="{{ !is_numeric($key) ? $key : '' }}">
                            @foreach($value as $subKey => $subValue)
                                <option @if( (isset($formElementValue) && $formElementValue == $subKey) || \Illuminate\Support\Facades\Request::old($formElementCodeName, '') === $subKey )  selected="selected" @endif value="{{ $subKey }}">{{ $subValue }}</option>
                            @endforeach
                        </optgroup>
                    @else
                        <option @if( (isset($formElementValue) && $formElementValue == $key) || \Illuminate\Support\Facades\Request::old($formElementCodeName, '') === $key )  selected="selected" @endif value="{{ $key }}">{{ $value }}</option>
                    @endif

                @endforeach
            @endif
        </select>
        <span class="c-select__drop-down"></span>
    </div>

@endsection