@php $page_data = [ 'has_sticky_sidebar' => true, 'classes' => ['body' => ' sidebar-xs has-detached-right'] ]; $fields = $form->fields; $current_user = auth()->user(); @endphp @extends('layouts.app', $page_data) @section('title', "My Forms | {$form->title}") @section('content') @include('partials.alert', ['name' => 'show'])
@php $symbol = $form::getStatusSymbols()[$form->status]; @endphp
{{ $form->title }} {{ $symbol['label'] }}
@include('forms.partials._form-menu')
{!! str_convert_line_breaks($form->description) !!}
In order to create a form, you need to click on any on the question type in the presentation section (right sidebar) below. Please ensure that you fill in the appropriate field before submitting.
@csrf
@php $formatted_fields = []; @endphp @if ($fields->count()) @foreach ($fields as $field)
@php $template = get_form_templates($field->template) @endphp {!! $template['sub_template'] !!}
@php $only_attributes = ['attribute', 'template', 'question', 'required', 'options']; ($template['attribute_type'] === 'array') and array_push($only_attributes, 'options'); $formatted_fields[$field->attribute] = $field->only($only_attributes); @endphp @endforeach @endif
@includeWhen(($form->status === $form::STATUS_OPEN), 'forms.partials._form-share') @includeWhen(($form->user_id === $current_user->id), 'forms.partials._form-collaborate') @include('forms.partials._form_availability') @endsection @section('plugin-scripts') @endsection @section('page-script') @include('forms.partials._script-show') @stack('script') @endsection