notStartsWith('robot', '
Your message has been successfully sent !
' ); $user_message = Form::sendMail($email_config); $current_step = 1; } } } if ($current_step == 1) { /* ================================================== Step 1 ================================================== */ $form_id = 'form-step-1'; $form = new Form('form-step-1', 'horizontal', 'novalidate', 'material'); // $form->setMode('development'); $form->addRadio('human-or-robot', 'I\'m a real human', 'real human'); $form->addRadio('human-or-robot', 'I\'m a robot', 'robot'); $form->printRadioGroup('human-or-robot', 'Are you a human or a robot ?', false, 'required'); $form->addBtn('submit', 'submit-btn', 1, 'Next arrow_right', 'class=btn btn-sm waves-effect waves-light ladda-button, data-style=zoom-in'); } elseif ($current_step == 2) { /* ================================================== Step 2 ================================================== */ $form_id = 'form-step-2'; $form = new Form('form-step-2', 'horizontal', 'novalidate', 'material'); // $form->setMode('development'); $form->addOption('how-did-you-come-here', 'By foot', 'By foot'); $form->addOption('how-did-you-come-here', 'By plane', 'By plane'); $form->addOption('how-did-you-come-here', 'By car', 'By car'); $form->addOption('how-did-you-come-here', 'By boat', 'By boat'); $form->addOption('how-did-you-come-here', 'By bike', 'By bike'); $form->addSelect('how-did-you-come-here', 'How did you come here ?', 'required'); $form->addBtn('submit', 'back-btn', 1, 'arrow_left Back', 'class=btn btn-sm orange darken-1 waves-effect waves-light', 'btns'); $form->addBtn('submit', 'submit-btn', 2, 'Next arrow_right', 'class=btn btn-sm waves-effect waves-light ladda-button, data-style=zoom-in', 'btns'); $form->printBtnGroup('btns'); } elseif ($current_step == 3) { /* ================================================== Step 3 ================================================== */ $form_id = 'form-step-3'; $form = new Form('form-step-3', 'horizontal', 'novalidate', 'material'); // $form->setMode('development'); $form->addHtml('You are human, you came here ' . strtolower($_SESSION['form-step-2']['how-did-you-come-here']) . '.
'); $form->addRadio('are-informations-correct', 'Yes, Excellent', 1); $form->addRadio('are-informations-correct', 'Absolutely not', 0); $form->printRadioGroup('are-informations-correct', 'Are these informations correct ?', false, 'required'); $form->addHelper('Enter your real e-mail if you want to receive results', 'user-email'); $form->addInput('email', 'user-email', '', 'E-mail', 'required'); $form->addBtn('submit', 'back-btn', 2, 'arrow_left Back', 'class=btn btn-sm orange darken-1 waves-effect waves-light', 'btns'); $form->addBtn('submit', 'submit-btn', 3, 'Submit arrow_right', 'class=btn btn-sm waves-effect waves-light ladda-button, data-style=zoom-in', 'btns'); $form->printBtnGroup('btns'); } // jQuery validation $form->addPlugin('formvalidation', '#' . $form_id); ?>