Pages vues depuis 25/05/2001 : 104 287 293
Index du forum »» Questions »» Formulaires
<?php
/************************************************************************/
/* SFORM Extender for NPDS SABLE Piscine Example */
/* =========================== */
/* NPDS Copyright (c) 2002-2019 by Philippe Brunier */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
if(!isset($T1)) $T1='';
settype($nom,'string');
settype($pre,'string');
settype($horaire,'string');
settype($tel,'string');
settype($mob,'string');
settype($email,'string');
settype($act,'string');
settype($des,'string');
settype($subok,'string');
echo"Demande réservation horaire piscine mois de Juillet et Aout 2020";
echo"<p>Pour des raisons de sécurité et de santé il est obligatoire de s'inscrire pour venir à la piscine municipale d'Amélie les bains Palalda</p>";
echo"<p><div='center'><img src='modules/sform/piscine/piscine.png'></div></p>";
echo"<p>Les champs notés d'un astérisque rouge <span style='color: #ff0000;'>*</span> sont obligatoires</p>";
echo"<p></p>";
/*$m->add_title("[french]Contactez-nous[/french]");*/
$m->add_field('nom', "[french]Nom [/french]",$nom,'text',true,150,'','');
$m->add_extender('nom', '', '<span class="help-block text-right" id="countcar_nom"></span>');
$m->add_field('pre', "[french]Prénom[/french]",$pre,'text',true,150,'','');
$m->add_extender('pre', '', '<span class="help-block text-right" id="countcar_pre"></span>');
/*$m->add_field('adr', "[french]Adresse[/french]",$adr,'text',true,255,'','');
$m->add_extender('adr', '', '<span class="help-block text-right" id="countcar_adr"></span>');
$m->add_field('compadr', "[french]Complément Adresse, Appartement, suite, unité, immeuble, étage, code d'accés etc. [/french]",$compadr,'text',false,255,'','');
$m->add_extender('compadr', '', '<span class="help-block text-right" id="countcar_compadr"></span>');
$m->add_field('tel', "[french]Tel[/french][english]Phone[/english]",$tel,'text',true,25,'',"0-9extend");
$m->add_extender('tel', '', '<span class="help-block text-right" id="countcar_tel"></span>');*/
$m->add_select('horaire', "[french]Tranche horaire[/french]",$horaire, true,'', false);
$m->add_extender('horaire', '<select name="horaire" size="4" onchange="alert(this.form.horaire.options[this.form.horaire.selectedIndex].value)"><option>11h30 - 13h00</option><option>13h30 - 15h00</option><option>15h30 - 17h00</option><option>17h30 - 19h00</option></select>','choisir un horaire');
$m->add_field('mob', "[french]Mobile[/french]",$mob,'text',true,25,'',"0-9extend");
$m->add_extender('mob', '', '<span class="help-block text-right" id="countcar_mob"></span>');
$m->add_field('email', "[french]Adresse de messagerie[/french]",$email,'text',true,255,'','email');
$m->add_extender('email', '', '<span class="help-block text-right" id="countcar_email"></span>');
$m->add_field('act', "[french]Nombre de personnes présentes[/french]",$act,'text',true,150,'','');
$m->add_extender('act', '', '<span class="help-block text-right" id="countcar_act"></span>');
$m->add_date('T1', aff_langue('[french]Date de votre venue[/french]'),$T1,'text','',true,20);
$m->add_extender('T1', '','<span class="help-block">JJ/MM/AAAA</span>');
// ----------------------------------------------------------------
// CES CHAMPS sont indispensables --- Don't remove these fields
// Anti-Spam
$m->add_Qspam();
$m->add_extra('
<div class="form-group row">
<div class="col-sm-8 ml-sm-auto" >');
$m->add_field('reset','',translate("Cancel"),'reset',false);
$m->add_extra(' ');
$m->add_field('','',"[french]Soumettre[/french][english]Submit[/english]",'submit',false);
$m->add_extra('
</div>
</div>');
$m->add_extra('
<script type="text/!javascript!">
//<![CDATA[
$(document).ready(function() {
inpandfieldlen("nom",150);
inpandfieldlen("pre",150);
inpandfieldlen("horaire",400);
inpandfieldlen("mob",25);
inpandfieldlen("email",255);
inpandfieldlen("act",150);
inpandfieldlen("T1",40);
});
//]]>
</script>');
// ----------------------------------------------------------------
$fv_parametres ='
T1: {
excluded: false,
validators: {
date: {
format: "DD/MM/YYYY",
message: "The date is not a valid"
}
}
}';
$fv_parametres .='
flatpickr("#T1", {
altInput: true,
altFormat: "l j F Y",
maxDate:"today",
minDate:"'.date("Y-m-d",(time()-3784320000)).'",
dateFormat:"d/m/Y",
"locale": "'.language_iso(1,'','').'",
});
';
?>