- @push('scripts')
- <script src="{{ mix('/js/mailform.js') }}"></script>
- @endpush
+ @if ($page->get('form'))
+
+ @push('scripts')
+ <script src="{{ mix('/js/mailform.js') }}"></script>
+ @endpush
- <div id="contact-form">
- <div class="form flex flex-col">
+<div id="contact-form">
+ <div class="form flex flex-col">
+ @if($page->get('form_intro'))
<p class="form-info text-navy">{{$page->get('form_intro')}}</p>
- <form class="flex flex-col text-navy mailform" action="/ajax/mailform" method="post"
- data-confirmation="{{$page->get('form_confirmation')??__('Votre message a bien été envoyé')}}">
- {{ csrf_field() }}
- <input type="hidden" value="{{$page->get('id')}}" name="page">
+ @endif
+ <form class="text-navy mailform" action="/ajax/mailform" method="post"
+ data-confirmation="{{$page->get('form_confirmation')??__('Votre message a bien été envoyé')}}" novalidate>
+ <input type="hidden" value="{{$page->get('id')}}" name="page">
+ <div class="fields grid" >
@foreach($page->get('form') as $field)
@php
$required=$field['mandatory']?' required':'';
@endswitch
</label>
@endforeach
+ </div>
- <div class="form-endmessage mt-5 text-grey-dark">
- @markdown($global->get('form_privacy'))
- </div>
- <div class="flex justify-between items-center xs:flex-col-reverse">
- <span class="text-grey-dark xs:self-start xs:mt-5">*{{__('Champs obligatoires')}}</span>
- <button type="submit" class="btn btn-custom xs:w-full"
- data-sending="{{__('Envoi en cours')}}">{{__('Envoyer')}}</button>
- </div>
- </form>
+ <div class="form-endmessage mt-5 text-grey-dark">
+ @markdown($global->get('form_privacy'))
+ </div>
+ <div class="flex justify-between items-center xs:flex-col-reverse">
+ <span class="text-grey-dark xs:self-start xs:mt-5">*{{__('Champs obligatoires')}}</span>
+ <button type="submit" class="btn btn-custom xs:w-full"
+ data-sending="{{__('Envoi en cours')}}">{{__('Envoyer')}}</button>
+ </div>
+ </form>
+ </div>
</div>
- </div>
+
+ @endif