@if($event->eventAttributes)
@foreach ($event->eventAttributes as $k => $v)
@if ($v->input_type === $inputType::INPUT_TYPE_TEXT)
@php
$html = $inputType->render(
$v->input_type,
[
"type" => $v->input_type,
"name" => "eventAttributes[{$v->id}]",
"class" => "form-control form-control-sm",
"required" => true,
"value" => (optional($membership)->client && $v->id === 'c947749e-24b8-4292-8732-4139b5d4ccc1') ? optional($membership->client->user)->first_name : null
]
);
@endphp
@endif
@if ($v->input_type === $inputType::INPUT_TYPE_EMAIL)
@php
$html = $inputType->render(
$v->input_type,
[
"type" => $v->input_type,
"name" => "eventAttributes[{$v->id}]",
"class" => "form-control form-control-sm",
"required" => true
]
);
@endphp
@endif
@if ($v->input_type === $inputType::INPUT_TYPE_NUMBER)
@php
$html = $inputType->render(
$v->input_type,
[
"type" => $v->input_type,
"name" => "eventAttributes[{$v->id}]",
"class" => "form-control form-control-sm",
"required" => true
]
);
@endphp
@endif
@if ($v->input_type === $inputType::INPUT_TYPE_SELECT)
@php
$tempValue = explode(",", $v->value);
$tempOptions = array_map("trim", $tempValue);
$html = $inputType->render(
$v->input_type,
[
"name" => "eventAttributes[{$v->id}]",
"options" => $tempOptions,
"class" => "form-control form-control-sm custom-select",
"required" => true
]
);
@endphp
@endif
@if ($v->input_type === $inputType::INPUT_TYPE_PHONE)
@php
$html = $inputType->render(
$v->input_type,
[
"type" => $v->input_type,
"name" => "eventAttributes[{$v->id}]",
"class" => "form-control form-control-sm",
"required" => true
]
);
@endphp
@endif
@endforeach
@endif