Index du Forum » » Questions

Auteur

Formulaires
colonelwog
1947       
 

  Posté : 22-06-2020 14:45

c'est ce que j'ai fait mais cela ne fonctionne pas pour avoir l'agenda ^^ ...
de plus j'ai essayé de mettre un choix multiple fonctionne pas non plus ni pour une case à cocher y a un truc que je pige pas dans les paramètres y a t il une aide en ligne quelques part ? Meme sur la bible il n'y a rien à ce sujet ...

voici mon code:


<?php
/********************************************************************* ***/
/* SFORM Extender for NPDS SABLE Piscine E xample            & nbsp;           */
/* ===========================                     & nbsp;            &n bsp;        */
/* NPDS Copyright (c) 2002-2019 by Philippe&nbs p;Brunier           &nbs p;         */
/*            &nb sp;            &nbs p;              ;                           & nbsp;    */
/* This program is free software. You can& nbsp;redistribute it and/or modify */
/* it under the terms of the GNU Gene ral 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&nbs p;Juillet et Aout 2020";
echo"<p>Pour des raisons de sécurité et d e santé il est obligatoire de s'inscrire pou r venir à la piscine municipale d'Amélie les  bains Palalda</p>";
echo"<p><div='center'><img src='modules/sform/piscine/pis cine.png'></div></p>";
echo"<p>Les champs notés d'un astérisque rouge  <span style='color: #ff0000;'>*</span> sont&nb sp;obligatoires</p>";
echo"<p></p>";
/*$m->add_title("[french]Contactez-nous[/french]");*/

$m->add_field('nom', "[french]Nom [/french]",$nom,'text',true,15 0,'','');
$m->add_extender('nom', '', '<span class="help-block&nbs p;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&nbs p;text-right" id="countcar_pre"></span>');

/*$m->add_field('adr', "[french]Adresse[/french]",$adr,'text',true,25 5,'','');
$m->add_extender('adr', '', '<span class="help-block&nbs p;text-right" id="countcar_adr"></span>');

$m->add_field('compadr', "[french]Complément Adresse, Appar tement, 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&nbs p;text-right" id="countcar_tel"></span>');*/


$m->add_select('horaire', "[french]Tranche horaire[/french]",$ho raire, true,'', false);
$m->add_extender('horaire', '<select name="horaire" size ="4" onchange="alert(this.form.horaire.options[this.form.horaire.selectedI ndex].value)"><option>11h30 - 13h00</option><option >13h30 - 15h00</option><option>15h30 - 17h00 </option><option>17h30 - 19h00</option></select& gt;','choisir un horaire');

$m->add_field('mob', "[french]Mobile[/french]",$mob,'text',true,25,'' ,"0-9extend");
$m->add_extender('mob', '', '<span class="help-block&nbs p;text-right" id="countcar_mob"></span>');

$m->add_field('email', "[french]Adresse de messagerie[/fren ch]",$email,'text',true,255,'','email');
$m->add_extender('email', '', '<span class="help-block&n bsp;text-right" id="countcar_email"></span>');

$m->add_field('act', "[french]Nombre de personnes prés entes[/french]",$act,'text',true,150,'','');
$m->add_extender('act', '', '<span class="help-block&nbs p;text-right" id="countcar_act"></span>');

$m->add_date('T1', aff_langue('[french]Date de votre v enue[/french]'),$T1,'text','',true,20);
$m->add_extender('T1', '','<span class="help-block">JJ/MM/ AAAA</span>');

// ----------------------------------------------------------------
// CES CHAMPS sont indispensables --- Don't&nbs p;remove these fields
// Anti-Spam
$m->add_Qspam();
$m->add_extra('
      <div class="form-group row"& gt;
         <div class="col -sm-8 ml-sm-auto" >');
$m->add_field('reset','',translate("Cancel"),'reset',false);
$m->add_extra('&nbsp;');
$m->add_field('','',"[french]Soumettre[/french][english]Submit[/english]", 'submit',false);
$m->add_extra('
         </div>
      </div>');
$m->add_extra('
      <script type="text/!javascript!"& gt;
      //<![CDATA[
         $(document).ready(funct ion() {
            inpan dfieldlen("nom",150);
            inpan dfieldlen("pre",150);
            inpan dfieldlen("horaire",400);

            
            inpan dfieldlen("mob",25);
            inpan dfieldlen("email",255);
            inpan dfieldlen("act",150);
            inpan dfieldlen("T1",40);
         });
      //]]>
      </script>');
// ----------------------------------------------------------------
$fv_parametres ='
         T1: {
            exclu ded: false,
            valid ators: {
              ;  date: {
              ;     format: "DD/MM/YYYY",
              ;     message: "The date is not&nb sp;a valid"
              ;  }
            }
         }';
$fv_parametres .='
         flatpickr("#T1", {
            altIn put: true,
            altFo rmat: "l j F Y",
            maxDa te:"today",
            minDa te:"'.date("Y-m-d",(time()-3784320000)).'",
            dateF ormat:"d/m/Y",
            "loca le": "'.language_iso(1,'','').'",
         });
         ';
        
?>




Merci jpb



Cet article provient de NPDS

http://www.npds.org/viewtopic.php?topic=26725&forum=9