@php
// if not otherwise specified, the hidden input should take up no space in the form
- $field['wrapper']['class'] = $field['wrapper']['class'] ?? $field['wrapperAttributes']['class'] ?? "hidden";
+ $field['wrapperAttributes']['class'] = $field['wrapperAttributes']['class'] ?? "hidden";
$v=old(square_brackets_to_dots($field['name'])) ?? $field['value'] ?? $field['default'] ?? '';
if(is_array($v) || $v instanceof stdClass){
$v=json_encode($v);
}
@endphp
- <!-- hidden input -->
+ <!-- hidden input -->
@include('crud::fields.inc.wrapper_start')
<input
- type="hidden"
- name="{{ $field['name'] }}"
- value="{{ $v }}"
- @include('crud::fields.inc.attributes')
+ type="hidden"
+ name="{{ $field['name'] }}"
+ value="{{ $v }}"
+ @include('crud::fields.inc.attributes')
>
@include('crud::fields.inc.wrapper_end')
+