Fix dropdown selects that aren't boolean, and only convert the select value to 1/0 if it's also boolean

This commit is contained in:
Kevin MacMartin 2022-06-15 16:13:57 -04:00
parent 0e7f8ce4f4
commit 5319d7328b

View file

@ -72,10 +72,15 @@
@endphp
@endif
@if(gettype($select_title))
@if(gettype($select_title) == 'boolean')
@php
$select_title = $select_title ? 'true' : 'false';
@endphp
@endif
@if(gettype($select_value) == 'boolean')
@php
$select_value = $select_value ? 1 : 0;
$select_title = $select_title ? 'true' : 'false';
@endphp
@endif