--- /dev/null
+<?php
+
+namespace Cube\Shortcodes;
+
+use function Roots\view;
+
+class CCVForm {
+
+ /**
+ * Common setup, will be automatically triggered by Init class if included
+ */
+ public function register() {
+
+ // Register [ccv_form] shortcode
+ add_shortcode('ccv_form', [$this, 'shortcode']);
+
+ add_action( 'wp_enqueue_scripts', function() {
+ // TODO: Register all necessary scripts and styles here (flatpickr, Parsely etc). See https://wordpress.stackexchange.com/q/165754
+ });
+
+ }
+
+ public function shortcode($attributes) {
+
+ // TODO: enqueue scripts and styles here when shortcode is actually used (avoids unwanted script inclusion on other pages)
+
+ extract(shortcode_atts([
+ 'name' => '', // Name of the form template
+ ], $attributes));
+
+ // List of all possible forms
+ $templates = [
+ 'consultation',
+ ];
+
+ if (in_array($name, $templates)) {
+ return view("forms/$name");
+ }
+
+ return false;
+ }
+
+}
--- /dev/null
+{{-- CONSULTATION FORM --}}
+
+{{-- SYMPTOMS --}}
+<div class="bg-light py-2v pl-4v pr-3v">
+ <h2>{{ __('1. Vos symptômes') }}</h2>
+
+ <ul>
+ <li>
+ {{ __('Problème principal', 'ccv') }}
+
+ <div class="flex justify-between items-center">
+ <label>
+ <input type="radio" name="problem-principal" value="{{ __('Cervicales', 'ccv') }}">
+ <span class="ml-2">{{ __('Cervicales') }}</span>
+ </label>
+ <label>
+ <input type="radio" name="problem-principal" value="{{ __('Lombaires', 'ccv') }}">
+ <span class="ml-2">{{ __('Lombaires', 'ccv') }}</span>
+ </label>
+ <label>
+ <input type="radio" name="problem-principal" value="{{ __('Scoliose', 'ccv') }}">
+ <span class="ml-2">{{ __('Scoliose', 'ccv') }}</span>
+ </label>
+ </div>
+ </li>
+ </ul>
+</div>
+
+{{-- TREATMENTS --}}
+<div class="bg-white py-2v pl-4v pr-3v">
+ <h2>{{ __('2. Vos traitements réalisés') }}</h2>
+</div>
+
+{{-- IMAGERY --}}
+<div class="bg-light py-2v pl-4v pr-3v">
+ <h2>{{ __('3. Votre imagerie') }}</h2>
+</div>
+
+{{-- CONTACT DETAILS --}}
+<div class="bg-white py-2v pl-4v pr-3v">
+ <h2>{{ __('4. Vos informations') }}</h2>
+</div>