Bonjour, je fais un formulaire d'inscription a trois niveau. c'est a dire après avoir remplir les premier on clique sur le bouton suivant et ainsi de suite jusqu'au derniers champ. mais le problème est qu'une fois tout les champs rempli, le bouton qui doit permettre d'envoyer les éléments dans la base ne fonctionne pas. svp pouvez vous m'aider

Ce que je fais

Décrivez ici votre code ou ce que vous cherchez à faire

code jquery 

<script>
        $(document).ready(function() {

//documentation : http://docs.jquery.com/Plugins/Validation/validate        
        $('#validate-form').validate({
            errorElement: 'div',
            errorClass: 'help-block',
            focusInvalid: false,
            rules: {
                email: {
                    required: true,
                    email:true
                },
                password: {
                    required: true,
                    minlength: 5
                },
                password2: {
                    required: true,
                    minlength: 5,
                    equalTo: "#password"
                },
                name: {
                    required: true
                },
                phone: {
                    required: false,
                },
                url: {
                    required: true,
                    url: true
                },
                comment: {
                    required: true
                },
                subscription: {
                    required: true
                },
                gender: 'required',
                    agree: 'required'
                },

                messages: {
                    email: {
                        required: "Please provide a valid email.",
                        email: "Please provide a valid email."
                    },
                    password: {
                        required: "Please specify a password.",
                        minlength: "Please specify a secure password."
                    },
                    subscription: "Please choose at least one option",
                    gender: "Please choose gender",
                    agree: "Please accept our policy"
                    },

                    invalidHandler: function (event, validator) { //display error alert on form submit   
                        $('.alert-danger', $('.login-form')).show();
                    },

                    highlight: function (e) {
                        $(e).closest('.form-group').removeClass('has-info').addClass('has-error');
                    },

                    success: function (e) {
                        $(e).closest('.form-group').removeClass('has-error').addClass('has-info');
                        $(e).remove();
                    },

                    errorPlacement: function (error, element) {
                        if(element.is(':checkbox') || element.is(':radio')) {
                            var controls = element.closest('div[class*="col-"]');
                            if(controls.find(':checkbox,:radio').length > 1) controls.append(error);
                            else error.insertAfter(element.nextAll('.labels:eq(0)').eq(0));
                        }
                        else error.insertAfter(element.parent());
                    },

                    submitHandler: function (form) {
                    },
                    invalidHandler: function (form) {
                    }
                });
            // Bootstrap Form Wizard    
            $('#bwizard').bootstrapWizard({

            'tabClass': 'bwizard-steps',
            'nextSelector': '.button-next', 
            'previousSelector': '.button-previous', 

            onTabClick: function(tab, navigation, index) {
                //alert('on tab click disabled');
                return false;

            }, onNext: function(tab, navigation, index) {
                var $valid = $("#validate-form").valid();
                if(!$valid) {
                    $validator.focusInvalid();
                    return false; } 

            }, onTabShow: function(tab, navigation, index) {
                console.log('onTabShow');
                var $total = navigation.find('li').length;
                var $current = index+1;
                var $percent = ($current/$total) * 100;
                $('#bwizard').find('.bar').css({width:$percent+'%'});
            }});

        });
    </script>

    code html 

     <form class="form-horizontal" id="validate-form" role="form" method="post" action="?ctrl=entreprise&amp;action=ajout_entreprise" name="Valider" enctype="multipart/form-data">

                        <div id="bwizard">

                            <div class="bw-navbar">
                                <div class="navbar-inner">
                                    <ul>
                                        <li><a href="#tab1" data-toggle="tab">Information sur Entreprise</a></li>
                                        <li><a href="#tab2" data-toggle="tab">Information sur le Responsable de l'Entreprise</a></li>
                                        <li><a href="#tab3" data-toggle="tab">Information relative &agrave; l'Agence</a></li>
                                    </ul>
                                </div>
                            </div>
                            <div id="bar" class="progress progress-striped active progress-mini">
                                <div class="bar progress-bar progress-bar-primary"></div>
                            </div>
                            <div class="tab-content">
                                <div class="tab-pane" id="tab1">
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label">Entreprise </label>
                                            <div class="col-sm-8">
                                                <div class="input-group">
                                                    <span class="input-group-addon"><i class="fa fa-link"></i></span>
                                                    <input type="text" style="un" class="form-control" placeholder="Nom de l'entreprise" name="entreprise" value="{entreprise}" required>
                                                </div>
                                            </div>
                                        </div>                                                                                
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label">Siege </label>
                                            <div class="col-sm-8">
                                                <div class="input-group">
                                                    <span class="input-group-addon"><i class="fa fa-link"></i></span>
                                                    <input type="text" style="un" class="form-control" placeholder="Localisation du siege" name="siege" value="{siege}" required>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label">CCM </label>
                                            <div class="col-sm-8">
                                                <div class="input-group">
                                                    <span class="input-group-addon"><i class="fa fa-link"></i></span>
                                                    <input type="text" style="un" class="form-control" placeholder="ccm de l'entreprise" name="ccme" value="{ccme}">
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label">RCCE </label>
                                            <div class="col-sm-8">
                                                <div class="input-group">
                                                    <span class="input-group-addon"><i class="fa fa-link"></i></span>
                                                    <input type="text" style="un" class="form-control" placeholder="rcce de l'entreprise" name="rccee" value="{rccee}">
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label">Téléhone </label>
                                            <div class="col-sm-8">
                                                <div class="input-group">
                                                    <span class="input-group-addon"><i class="fa fa-phone"></i></span>
                                                    <input type="text" class="form-control input-phone" id="form-field-mask-2" placeholder="Contact de la Société" name="phone" value="{phone}" required>
                                                </div>
                                            </div>
                                        </div>

                                    </div>
                                    <div class="col-sm-6">

                                        <div class="form-group">
                                                    <label class="col-sm-3 control-label">Email</label>
                                                    <div class="col-sm-8">
                                                        <div class="input-group">
                                                            <span class="input-group-addon"><i class="fa fa-envelope"></i></span>
                                                            <input type="email" name="mail" value="{mail}" class="form-control"  >
                                                        </div>
                                                    </div>
                                        </div>

                                        <div class="form-group">
                                            <label class="col-sm-3 control-label">Logo </label>
                                            <div class="col-sm-8">
                                                <div class="input-group">
                                                    <div class="fileinput fileinput-new" data-provides="fileinput">
                                                        <div class="fileinput-new thumbnail" style="width: 160px; height: 120px;" data-trigger="fileinput">
                                                            <img src="http://placehold.it/160x120" alt="...">
                                                        </div>
                                                        <div class="fileinput-preview fileinput-exists thumbnail" style="max-width: 160px; max-height: 120px"></div>
                                                        <div>
                                                            <span class="btn btn-white btn-file">
                                                                <span class="fileinput-new">Select image</span>
                                                                <span class="fileinput-exists">Change</span>
                                                                <input type="file"  accept="image/*" name="photo">
                                                            </span>
                                                            <a href="#" class="btn btn-orange fileinput-exists" data-dismiss="fileinput">Remove</a>
                                                        </div>
                                                    </div>
                                                    <script src="assets/js/fileinput.js"></script>
                                                </div>
                                            </div>
                                            <span class=" alert-danger">
                                                {verif}
                                            </span>
                                        </div>   
                                    </div>
                                </div>
                                <div class="tab-pane" id="tab2">
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label">Matricule </label>
                                            <div class="col-sm-8">
                                                <div class="input-group">
                                                    <span class="input-group-addon"><i class="fa fa-link"></i></span>
                                                    <input type="text" class="form-control" placeholder="Code du Personnel " name="matricule" value="{matricule}" required readonly="readonly">
                                                </div>
                                            </div>
                                        </div>
                                        <input type="hidden" class="form-control" placeholder="Code du Personnel " name="nump" value="{nump}" >

                                        <div class="form-group">
                                            <label class="col-sm-3 control-label">Nom </label>
                                            <div class="col-sm-8">
                                                <div class="input-group">
                                                    <span class="input-group-addon"><i class="fa fa-link"></i></span>
                                                    <input type="text" style="un" class="form-control" placeholder="Nom de la personne" name="nom" value="{nom}" required>
                                                </div>
                                            </div>
                                        </div>                                                                                
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label">Prénoms </label>
                                            <div class="col-sm-8">
                                                <div class="input-group">
                                                    <span class="input-group-addon"><i class="fa fa-link"></i></span>
                                                    <input type="text" style="un" class="form-control" placeholder="Prénoms de la personne" name="prenom" value="{prenom}" required>
                                                </div>
                                            </div>
                                        </div>

                                        <div class="form-group">
                                            <label class="col-sm-3 control-label">Genre</label>
                                            <div class="col-sm-8">
                                                <div class="input-group">
                                                    <span class="input-group-addon"><i class="fa fa-link"></i></span>
                                                    <select class="form-control" name="sexe" style="color:#F30" data-live-search="false" value="{sexe}" id="select" required>
                                                        <option> Le Genre </option>
                                                        <option value="M">Masculin</option>
                                                        <option value="F">Feminin</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label">Téléhone </label>
                                            <div class="col-sm-8">
                                                <div class="input-group">
                                                    <span class="input-group-addon"><i class="fa fa-phone"></i></span>
                                                    <input type="text" class="form-control input-phone" id="form-field-mask-2" placeholder="Contact de la Société" name="phone" value="{phone}" required>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label">Fonction</label>
                                            <div class="col-sm-8">
                                                <div class="input-group">
                                                    <span class="input-group-addon"><i class="fa fa-link"></i></span>
                                                    <select class="form-control" name="fonction" style="color:#F30" data-live-search="false" value="{fonction}" id="select" required>
                                                         {fonction}
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                         <div class="form-group">
                                            <label class="col-sm-3 control-label">Salaire </label>
                                            <div class="col-sm-8">
                                                <div class="input-group">
                                                    <input id="touchspin-regl_vent" placeholder="0"  type="text" value="{salaire}" name="salaire" required>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label">Profil</label>
                                            <div class="col-sm-8">
                                                <div class="input-group">
                                                    <span class="input-group-addon"><i class="fa fa-link"></i></span>
                                                    <select class="form-control" name="profil" style="color:#F30" data-live-search="false" value="{profil}" id="select" required>
                                                        {profil}
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="tab-pane" id="tab3">
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label">Matricule </label>
                                            <div class="col-sm-8">
                                                <div class="input-group">
                                                    <span class="input-group-addon"><i class="fa fa-link"></i></span>
                                                    <input type="text" class="form-control" placeholder="Code du Personnel " name="matricule" value="{matricule}" required readonly="readonly">
                                                </div>
                                            </div>
                                        </div>
                                        <input type="hidden" class="form-control" placeholder="Code du Personnel " name="nump" value="{nump}" >

                                        <div class="form-group">
                                            <label class="col-sm-3 control-label">Nom </label>
                                            <div class="col-sm-8">
                                                <div class="input-group">
                                                    <span class="input-group-addon"><i class="fa fa-link"></i></span>
                                                    <input type="text" style="un" class="form-control" placeholder="Nom de la personne" name="nom" value="{nom}" required>
                                                </div>
                                            </div>
                                        </div>                                                                                
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label">Prénoms </label>
                                            <div class="col-sm-8">
                                                <div class="input-group">
                                                    <span class="input-group-addon"><i class="fa fa-link"></i></span>
                                                    <input type="text" style="un" class="form-control" placeholder="Prénoms de la personne" name="prenom" value="{prenom}" required>
                                                </div>
                                            </div>
                                        </div>

                                        <div class="form-group">
                                            <label class="col-sm-3 control-label">Genre</label>
                                            <div class="col-sm-8">
                                                <div class="input-group">
                                                    <span class="input-group-addon"><i class="fa fa-link"></i></span>
                                                    <select class="form-control" name="sexe" style="color:#F30" data-live-search="false" value="{sexe}" id="select" required>
                                                        <option> Le Genre </option>
                                                        <option value="M">Masculin</option>
                                                        <option value="F">Feminin</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-sm-6">
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label">Téléhone </label>
                                            <div class="col-sm-8">
                                                <div class="input-group">
                                                    <span class="input-group-addon"><i class="fa fa-phone"></i></span>
                                                    <input type="text" class="form-control input-phone" id="form-field-mask-2" placeholder="Contact de la Société" name="phone" value="{phone}" required>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label">Fonction</label>
                                            <div class="col-sm-8">
                                                <div class="input-group">
                                                    <span class="input-group-addon"><i class="fa fa-link"></i></span>
                                                    <select class="form-control" name="fonction" style="color:#F30" data-live-search="false" value="{fonction}" id="select" required>
                                                         {fonction}
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                         <div class="form-group">
                                            <label class="col-sm-3 control-label">Salaire </label>
                                            <div class="col-sm-8">
                                                <div class="input-group">
                                                    <span class="input-group-addon"><i class="fa fa-euro"></i></span>
                                                    <input type="text" style="un" class="form-control" placeholder="Salaire de la personne" name="salaire" value="{salaire}" required>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-3 control-label">Profil</label>
                                            <div class="col-sm-8">
                                                <div class="input-group">
                                                    <span class="input-group-addon"><i class="fa fa-link"></i></span>
                                                    <select class="form-control" name="profil" style="color:#F30" data-live-search="false" value="{profil}" id="select" required>
                                                        {profil}
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                    </div>

                                </div>
                                <div class="form-actions">
                                    <div class="form-group">
                                        <div class="col-sm-offset-3 col-sm-9">
                                            <button type="button" class="btn button-previous" name="previous" value="Prev"><i class="fa fa-arrow-left"></i>Prev</button>                        
                                            <button type="button" class="btn button-next btn-primary" name="next" value="Next">Next<i class="fa fa-arrow-right icon-on-right"></i></button>
                                        </div>  
                                    </div>      
                                </div>
                            </div>

                        </div>

                        <div class="form-actions">
                            <div class="form-group">
                                <div class="col-sm-offset-2 col-sm-8">
                                    <center>
                                        <Button type="submit" class="btn btn-primary btn-line" name="enregistrer">Valider </Button>
                    <Button type="reset" class="btn btn-primary btn-line" name="Annuler">Annuler</Button>
                                    </center>
                                </div>
                            </div>
                        </div>

                    </form>

Ce que je veux

Décrivez ici ce que vous cherchez à obtenir

Ce que j'obtiens

Décrivez ici vos erreurs ou ce que vous obtenez à la place de ce que vous attendez :(

Aucune réponse