@if (count($errors) > 0)
@foreach ($errors->all() as $error)
- {{ $error }}
@endforeach
@endif
@php
$dataTypeRows = $dataType->{($edit ? 'editRows' : 'addRows' )};
@endphp
@foreach($dataTypeRows as $row)
@php
$display_options = $row->details->display ?? NULL;
if ($dataTypeContent->{$row->field.'_'.($edit ? 'edit' : 'add')}) {
$dataTypeContent->{$row->field} = $dataTypeContent->{$row->field.'_'.($edit ? 'edit' : 'add')};
}
@endphp
@if (isset($row->details->legend) && isset($row->details->legend->text))
@endif
id)){{ "id=$display_options->id" }}@endif>
{{ $row->slugify }}
@include('voyager::multilingual.input-hidden-bread-edit-add')
@if ($add && isset($row->details->view_add))
@include($row->details->view_add, ['row' => $row, 'dataType' => $dataType, 'dataTypeContent' => $dataTypeContent, 'content' => $dataTypeContent->{$row->field}, 'view' => 'add', 'options' => $row->details])
@elseif ($edit && isset($row->details->view_edit))
@include($row->details->view_edit, ['row' => $row, 'dataType' => $dataType, 'dataTypeContent' => $dataTypeContent, 'content' => $dataTypeContent->{$row->field}, 'view' => 'edit', 'options' => $row->details])
@elseif (isset($row->details->view))
@include($row->details->view, ['row' => $row, 'dataType' => $dataType, 'dataTypeContent' => $dataTypeContent, 'content' => $dataTypeContent->{$row->field}, 'action' => ($edit ? 'edit' : 'add'), 'view' => ($edit ? 'edit' : 'add'), 'options' => $row->details])
@elseif ($row->type == 'relationship')
@include('voyager::formfields.relationship', ['options' => $row->details])
@else
{!! app('voyager')->formField($row, $dataType, $dataTypeContent) !!}
@endif
@foreach (app('voyager')->afterFormFields($row, $dataType, $dataTypeContent) as $after)
{!! $after->handle($row, $dataType, $dataTypeContent) !!}
@endforeach
@if ($errors->has($row->field))
@foreach ($errors->get($row->field) as $error)
{{ $error }}
@endforeach
@endif
@endforeach