@extends('layouts.app') @section('title', $form->name ?? 'Form Details') @push('styles') @endpush @section('content') {{-- Stats --}}
{{ $totalSubmissions ?? 0 }}
Total Submissions
{{ $weekSubmissions ?? 0 }}
Submissions This Week
{{-- Left: Preview --}}

Form Preview

{{ $form->name ?? 'Your Form' }}
@if($form->description ?? null)
{{ $form->description }}
@endif
@php $fields = is_string($form->fields ?? '[]') ? json_decode($form->fields, true) : ($form->fields ?? []); @endphp @forelse($fields as $field)
@switch($field['type'] ?? 'text') @case('textarea') @break @case('select') @break @case('checkbox')
@foreach(explode("\n", $field['options'] ?? '') as $opt) @if(trim($opt)) @endif @endforeach
@break @case('radio')
@foreach(explode("\n", $field['options'] ?? '') as $opt) @if(trim($opt)) @endif @endforeach
@break @default @endswitch
@empty

This form has no fields configured.

@endforelse
{{-- Recent Submissions --}}

Recent Submissions

@if(isset($submissions) && $submissions->count()) @foreach($submissions as $submission) @endforeach
Customer Name Email Date Action
{{ $submission->customer_name ?? 'N/A' }} {{ $submission->customer_email ?? '—' }} {{ $submission->created_at->format('M d, Y') }} View
@else

No submissions yet. Share your form to start receiving orders!

@endif
{{-- Right: Embed Codes --}}

Embed Code

iFrame Embed
<iframe src="{{ url('/forms/' . ($form->slug ?? 'form')) }}" width="100%" height="600" frameborder="0"></iframe>
WordPress Shortcode
[tenseal_form id="{{ $form->id }}"]
API Endpoint
{{ url('/api/v1/forms/' . ($form->slug ?? 'form') . '/submit') }}
{{-- Form Info --}}

Form Info

Slug /{{ $form->slug ?? 'form' }}
Created {{ $form->created_at->format('M d, Y') }}
Last Updated {{ $form->updated_at->format('M d, Y') }}
@endsection @push('scripts') @endpush