Viewing 2 reply threads
  • Author
    Posts
    • #7714
      lunatikzx
      Member

      It seems i did something wrong and i need clarification , at the start of the week my form was submitting but now it does not work anymore can anyone help me quickly ?

      <?php
      /*
      Title: Form du  projet
      Description: Champs du post
      Method: post
      Logged in: false
      */
      
      $args   = array(
        'post_type'=>'ecoles',
        'posts_per_page'=> -1
      );
      
      $query  = new WP_Query( $args );
      $ecoles_array = array('0'=>"Choisir Une école");
      
      $posts = $query->get_posts();
      
      foreach($posts as $post){
        $ecoles_array[$post->ID] = $post->post_title;
      }
      
      piklist('field', array(
        'type'  => 'hidden',
        'scope' => 'post',
        'field' => 'post_type',
        'value' => 'fiche'
      ));
      
      piklist('field', array(
       'type' => 'hidden',
       'scope' => 'post',
       'field' => 'post_status',
       'value' => 'pending'
      ));
      
      piklist('field', array(
        'type' => 'text',
        'scope' => 'post', // post_title is in the wp_posts table, so scope is: post,
        'field' => 'post_title',
        'label' => __('Title', '_reucir'),
        'attributes' => array(
          'wrapper_class' => 'post_title',
          'style' => 'width: 100%'
        )
      ));
      
      piklist('field', array(
        'type'    => 'select',
        'field'   => '_ecolie',
        'scope'   => 'post_meta',
        'attributes' => array('class' => 'change_ecole'),
        'value' => (isset($_GET['schoolid'])?$_GET['schoolid']:0),
        'choices' => $ecoles_array
      ));
      
      piklist('field', array(
        'type' => 'group',
        'label' => __('Informations de base', '_reucir'),
        'list' => false,
        'fields' => array(
          array(
            'type'      => 'radio',
            'field'     => '_adok',
            'scope'     => 'post_meta',
            'label'     => __('Est-ce la bonne Adresse?', '_reucir'),
            'required'  => false,
            'columns'   => 3,
            'value'     => 'oui',
            'choices'   => array(
              'oui' => 'Oui',
              'non' => 'Non'
            )
          ),
          array(
            'type'      => 'number',
            'field'     => '_nbenseignant',
            'scope'     => 'post_meta',
            'label'     => __('Nombre d\'enseignants engagé dans le projet:', '_reucir'),
            'value'     => 1,
            'columns'   => 3,
            'attributes'=> array(
              'min'  => 1,
              'max'  => 80,
              'step' => 1
            )
          ),
          array(
            'type'      => 'number',
            'field'     => '_nbprofessionel',
            'scope' => 'post_meta',
            'label'     => __('Nombre de professionnels engagé dans le projet:', '_reucir'),
            'value'     => 1,
            'columns'   => 3,
            'attributes'=> array(
              'min'  => 1,
              'max'  => 10,
              'step' => 1
            )
          ),
          array(
            'type'      => 'number',
            'field'     => '_nbgestionnaire',
            'scope' => 'post_meta',
            'label'     => __('Nombre de gestionnaires scolaires engagé dans le projet:', '_reucir'),
            'value'     => 1,
            'columns'   => 3,
            'attributes'=> array(
              'min'  => 1,
              'max'  => 10,
              'step' => 1
            )
          ),
          array(
            'type'        => 'text',
            'field'       => '_contact_nom',
            'scope'       => 'post_meta',
            'label'       => __('Nom d\'une personne à contacter:', '_reucir'),
            'columns'     => 12,
            'placeholder' => "Inscrivez le nom du contact"
          ),
          array(
            'type'        => 'text',
            'field'       => '_contact_email',
            'scope'     => 'post_meta',
            'label'       => __('Adresse courriel:', '_reucir'),
            'columns'     => 12,
            'placeholder' => "Inscrivez l'adresse courriel"
          ),
          array(
            'type'      => 'select',
            'field'     => '_ordredenseignement',
            'scope'     => 'post_meta',
            'label'     => __('Choisir l\'ordre d\'enseignement:', '_reucir'),
            'value'     => 'primaire',
            'columns'   => 12,
            'choices'   => array(
              'primaire'  =>'Primaire',
              'secondaire'=>'Secondaire'
            )
          ),
        )
      ));
      piklist('field', array(
        'type'  => 'group',
        'list'  => false,
        'scope' => 'post_meta',
        'field' => '_ordred_p',
        'label' => __('Primaire', '_reucir'),
        'attributes' => array(
            'wrapper_class' => 'primaire-wrap',
        ),
        'fields' => array(
          array(
            'type'    => 'select',
            'field'   => '_primaire_cycle',
            'scope'   => 'post_meta',
            'label'   => __('Choisir le cycle d\'enseignement:', '_reucir'),
            'columns' => 12,
            'choices' => array(
              ""  => "Choisir une valeur",
              "0" => "Préscolaire",
              "1" => "1er cycle",
              "2" => "2 cycle",
              "3" => "3e cycle",
              "4" => "Adaptation scolaire"
            )
          ),
          array(
            'type' => 'group',
            'scope' => 'post_meta',
            'label' => __('Renseignements complémentaire: (facultatif)', '_reucir'),
            'list' => false,
            'description' => __('Renseignements complémentaires sur l\'école primaire:', 'piklist-demo'),
            'fields' => array(
              array(
                'type'    => 'select',
                'field'   => '_primaire_comp_part',
                'scope' => 'post_meta',
                'columns' => 6,
                'attributes' => array(
                  'class' => 'prim_choix',
                ),
                'choices' => array(
                  ''       =>'Choisir une valeur',
                  'Programme particulier' => array(
                     'pei'    =>'Programme d\'éducation internationales (PEI)',
                     'anglais'=>'Anglais intensif',
                  ),
                  'Programme local' => array(
                      'autre'  =>'Autre',
                  )
                )
              ),
              array(
                'type'        => 'text',
                'scope' => 'post_meta',
                'field'       => '_primaire_comp_local',
                'label'       => __('Programme local:', '_reucir'),
                'columns'     => 6,
                'attributes' => array(
                  'class' => 'prim_local',
                ),
                'placeholder' => "Inscrivez le nom du programme Local"
              ),
            )
          ),
          array(
            'type'  => 'group',
            'label' => __('Quel est le domaine d\'apprentissage ciblé?', '_reucir'),
            'list'  => false,
            'fields' =>array(
              array(
                'type'      => 'checkbox',
                'scope' => 'post_meta',
                'field'     => '_primaire_domaine',
                'columns'   => 12,
                'list'      => true,
                'attributes' => array(
                    'class' => 'prim_domaine',
                ),
                'choices'   => array(
                  "langue"         => "Langue",
                  "math"           => "Mathématique",
                  "scettechno"     => "Science et technologie",
                  "developpement"  => "Développement de la personne",
                  "arts"           => "Arts",
                  "univers"        => "Univers social"
                )
              ),
              array(
                'type'      => 'checkbox',
                'field'     => '_primaire_langue',
                'scope' => 'post_meta',
                'label'     => __('Langue', '_reucir'),
                'required'  => false,
                'columns'   => 3,
                'attributes' => array(
                    'class' => 'prim_langue',
                ),
                'choices'   => array(
                  'francais'  => 'Français',
                  'anglais'   => 'Anglais'
                )
              ),
              array(
                'type'      => 'checkbox',
                'field'     => '_primaire_personne',
                'scope' => 'post_meta',
                'label'     => __('Développement de la personne', '_reucir'),
                'required'  => false,
                'columns'   => 3,
                'attributes' => array(
                    'class' => 'prim_developpement',
                ),
                'choices'   => array(
                  'ethique'  => 'Éthique et culture religieuse',
                  'edph'     => 'Éducation physique'
                )
              ),
              array(
                'type'      => 'checkbox',
                'field'     => '_primaire_arts',
                'scope' => 'post_meta',
                'label'     => __('Arts', '_reucir'),
                'required'  => false,
                'columns'   => 3,
                'attributes' => array(
                    'class' => 'prim_arts',
                ),
                'choices'   => array(
                  'musique'     => 'Musique',
                  'plastiques'  => 'Arts plastiques',
                  'danse'       => 'Danse',
                  'theatre'     => 'Théâtre'
                )
              ),
              array(
                'type'      => 'checkbox',
                'field'     => '_primaire_social',
                'scope' => 'post_meta',
                'label'     => __('Univers social', '_reucir'),
                'required'  => false,
                'columns'   => 3,
                'attributes' => array(
                    'class' => 'prim_univers',
                ),
                'choices'   => array(
                  'historie'     => 'Histoire',
                  'geographie'  => 'Géographie',
                )
              )
            )
          ),
          array(
            'type'    => 'select',
            'field'   => '_primaire_sujet',
            'scope' => 'post_meta',
            'label'   => __('Avez-vous ciblé un sujet?:', '_reucir'),
            'columns' => 12,
            'attributes' => array(
                'class' => 'prim_sujet',
            ),
            'choices' => array(
              ""            => "Choisir une valeur",
              "literatie"   => "Littératie",
              "numeratie"   => "Numératie",
              "autre"       => "Autre",
            )
          ),
          array(
            'type'    => 'text',
            'scope' => 'post_meta',
            'attributes' => array(
                'class' => 'prim_sujet_autre',
            ),
            'field'   => '_primaire_sujet_autre',
            'label'   => __('Autre:', '_reucir'),
            'columns' => 12,
          ),
        )
      
      ));
      piklist('field', array(
        'type' => 'group',
        'list' => false,
        'field' => '_ordred_s',
        'scope' => 'post_meta',
        'label' => __('Secondaire', '_reucir'),
        'attributes' => array(
            'id' => 'primaire',
        ),
        'fields' => array(
          array(
            'type'    => 'select',
            'field'   => '_secondaire_cycle',
            'scope' => 'post_meta',
            'label'   => __('Choisir le cycle d\'enseignement:', '_reucir'),
            'columns' => 12,
            'attributes' => array(
                'class' => 'seco_cycle',
            ),
            'choices' => array(
              "1" => "1er cycle",
              "2" => "2e cycle",
            )
          ),
          array(
            'type'    => 'select',
            'field'   => '_secondaire_deux_cycle',
            'scope' => 'post_meta',
            'label'   => __('Choisir le cheminement:', '_reucir'),
            'columns' => 12,
            'attributes' => array(
                'class' => 'seco_second_cycle',
            ),
            'choices' => array(
              ""            => "Choisir une valeur",
              "general"     => "Cheminement général",
              "specialise"  => "Cheminement spécialisé",
              "particulier" => "Cheminement particulier"
            )
          ),
          array(
            'type' => 'group',
            'scope' => 'post_meta',
            'label' => __('Renseignements complémentaire: ', '_reucir'),
            'list' => false,
            'fields' => array(
              array(
                'type'    => 'select',
                'scope' => 'post_meta',
                'field'   => '_secondaire_comp_part',
                'label'   => __('Programme particulier:', '_reucir'),
                'columns' => 6,
                'attributes' => array(
                    'class' => 'seco_choix',
                ),
                'choices' => array(
                  ''        => 'Choisir une valeur',
                  'pei'     => 'Programme d\'éducation internationales (PEI)',
                  'anglais' => 'Anglais intensif',
                  'sports'  => 'Sports-études',
                  'arts'    => 'Arts-études',
                  'autre'   => 'Autre'
                )
              ),
              array(
                'type'        => 'text',
                'scope' => 'post_meta',
                'field'       => '_secondaire_comp_local',
                'label'       => __('Programme local:', '_reucir'),
                'attributes' => array(
                    'class' => 'seco_local',
                ),
                'columns'     => 6,
                'placeholder' => "Inscrivez le nom du programme Local"
              ),
            )
          ),
          array(
            'type'  => 'group',
            'scope' => 'post_meta',
            'label' => __('Quel est le domaine d\'apprentissage ciblé?', '_reucir'),
            'list'  => false,
            'fields' =>array(
              array(
                'type'      => 'checkbox',
                'scope' => 'post_meta',
                'field'     => '_secondaire_domaine',
                'columns'   => 12,
                'list'      => true,
                'attributes' => array(
                    'class' => 'seco_domaine',
                ),
                'choices'   => array(
                  "langue"         => "Langue",
                  "math"           => "Mathématique",
                  "scettechno"     => "Science et technologie",
                  "developpement"  => "Développement de la personne",
                  "arts"           => "Arts",
                  "univers"        => "Univers social"
                )
              ),
              array(
                'type'      => 'checkbox',
                'scope' => 'post_meta',
                'field'     => '_secondaire_langue',
                'label'     => __('Langue', '_reucir'),
                'required'  => false,
                'columns'   => 3,
                'attributes' => array(
                    'class' => 'seco_langue',
                ),
                'choices'   => array(
                  'francais'  => 'Français',
                  'anglais'   => 'Anglais'
                )
              ),
              array(
                'type'      => 'checkbox',
                'scope' => 'post_meta',
                'field'     => '_secondaire_personne',
                'label'     => __('Développement de la personne', '_reucir'),
                'required'  => false,
                'columns'   => 3,
                'attributes' => array(
                    'class' => 'seco_developpement',
                ),
                'choices'   => array(
                  'ethique'  => 'Éthique et culture religieuse',
                  'edph'     => 'Éducation physique'
                )
              ),
              array(
                'type'      => 'checkbox',
                'scope' => 'post_meta',
                'field'     => '_secondaire_arts',
                'label'     => __('Arts', '_reucir'),
                'required'  => false,
                'columns'   => 3,
                'attributes' => array(
                    'class' => 'seco_arts',
                ),
                'choices'   => array(
                  'musique'     => 'Musique',
                  'plastiques'  => 'Arts plastiques',
                  'danse'       => 'Danse',
                  'theatre'     => 'Théâtre'
                )
              ),
              array(
                'type'      => 'checkbox',
                'scope' => 'post_meta',
                'field'     => '_secondaire_social',
                'label'     => __('Univers social', '_reucir'),
                'required'  => false,
                'columns'   => 3,
                'attributes' => array(
                    'class' => 'seco_univers',
                ),
                'choices'   => array(
                  'historie'     => 'Histoire',
                  'geographie'  => 'Géographie',
                )
              ),
              array(
                'type'      => 'checkbox',
                'scope' => 'post_meta',
                'field'     => '_secondaire_math',
                'label'     => __('Mathématiques', '_reucir'),
                'required'  => false,
                'columns'   => 6,
                'attributes' => array(
                    'class' => 'seco_math',
                ),
                'choices'   => array(
                  'math'        => 'Mathématique',
                  'math_fort'   => 'Mathématique 4e et 5e secondaire'
                )
              ),
              array(
                'type'      => 'checkbox',
                'scope' => 'post_meta',
                'field'     => '_secondaire_math_seq',
                'label'     => __('Mathématiques séquence', '_reucir'),
                'required'  => false,
                'columns'   => 6,
                'attributes' => array(
                    'class' => 'seco_math_seq',
                ),
                'choices'   => array(
                  'cultetsoc' => 'Séquence: Culture, société et technique',
                  'snat'      => 'Séquence: Sciences naturelles',
                  'techsc'    => 'Séquence: Technico-sciences'
                )
              ),
            )
          ),
          array(
            'type'    => 'select',
            'scope' => 'post_meta',
            'field'   => '_secondaire_sujet',
            'label'   => __('Avez-vous ciblé un sujet?:', '_reucir'),
            'columns' => 12,
            'attributes' => array(
                'class' => 'seco_sujet',
            ),
            'choices' => array(
              ""            => "Choisir une valeur",
              "literatie"   => "Littératie",
              "numeratie"   => "Numératie",
              "autre"       => "Autre",
            )
          ),
          array(
            'type'    => 'text',
            'scope' => 'post_meta',
            'field'   => '_secondaire_sujet_autre',
            'label'   => __('Autre:', '_reucir'),
            'attributes' => array(
                'class' => 'seco_sujet_autre',
            ),
            'columns' => 6,
          ),
        )
      ));
      piklist('field', array(
        'type' => 'group',
        'label' => __('Démarche d\'analyse d\'une pratique à la lumière des connaissances issus de la recherche Identifier l\'étape?', '_reucir'),
        'list' => false,
        'scope' => 'post_meta',
        'description' => __('', '_reucir'),
        'fields' => array(
          array(
            'type'    => 'textarea',
            'scope' => 'post_meta',
            'field'   => '_etape_un',
            'label'   => __('<h3>Étape 1 :</h3> <span>Comment avez-vous fait le choix de la pratique à cibler en fonction du besoin d’apprentissage de l’élève ?</span>', '_reucir'),
            'columns' => 12,
            'attributes' => array(
              'rows'  => 10,
              'cols'  => 50,
              'maxlength' => '250'
            )
          ),
          array(
            'type'    => 'textarea',
            'scope' => 'post_meta',
            'field'   => '_etape_deux',
            'label'   => __('<h3>Étape 2 :</h3> <span>Comment vous êtes-vous  questionné sur les pratiques les plus efficaces pour atteindre les objectifs d’apprentissage ciblé ?</span>', '_reucir'),
            'columns' => 12,
            'attributes' => array(
              'rows'  => 10,
              'cols'  => 50,
              'maxlength' => '250'
            )
          ),array(
            'type'    => 'textarea',
            'scope' => 'post_meta',
            'field'   => '_etape_trois',
            'label'   => __('<h3>Étape 3 :</h3> <span>Comment avez-vous priorisé et planifié les actions pédagogiques en fonction des objectifs d’apprentissage ?</span>', '_reucir'),
            'columns' => 12,
            'attributes' => array(
              'rows'  => 10,
              'cols'  => 50,
              'maxlength' => '250'
            )
          ),array(
            'type'    => 'textarea',
            'scope' => 'post_meta',
            'field'   => '_etape_quatre',
            'label'   => __('<h3>Étape 4 :</h3> <span>Comment avez-vous mis en œuvre l’intervention pédagogique ?</span>', '_reucir'),
            'columns' => 12,
            'attributes' => array(
              'rows'  => 10,
              'cols'  => 50,
              'maxlength' => '250'
            )
          ),array(
            'type'    => 'textarea',
            'scope' => 'post_meta',
            'field'   => '_etape_cinq',
            'label'   => __('<h3>Étape 5 :</h3> <span>Comment avez-vous recueilli les données qui permettent le suivi et la régulation ?</span>', '_reucir'),
            'columns' => 12,
            'attributes' => array(
              'rows'  => 10,
              'cols'  => 50,
              'maxlength' => '250'
            )
          ),
        )
      ));
      piklist('field', array(
        'type' => 'submit',
        'field' => 'submit',
        'value' => 'Submit'
      ));
      
    • #7716
      lunatikzx
      Member

      Right now the form seems ok but the submit button wont work

    • #7718
      lunatikzx
      Member
      This reply has been marked as private.
Viewing 2 reply threads
  • The topic ‘Front-end’ is closed to new replies.