Giter VIP home page Giter VIP logo

adeliom-form-js's Introduction

Récupérer le projet

Télécharger manuellement le repo en local

Dépendances

yarn add vue vuelidate vuelidate-error-extractor
yarn add https://bitbucket.org/adeliomgit/dauphine-js.git

Exemple codesandbox

https://codesandbox.io/s/formulaire-multi-etapes-xsx4x

Configuration données .json

Exemple 1 :

{
    "question": "Quel produit vous intéresse ?",
    "name": "product", => Nom du champ, celui-ci sera envoyé lors de la requête AJAX vers l'API
    "nextStep": "step-2", => correspond au nom du fichier pour la seconde étape
    "url": "etape-1", => url de l'étape
    "summary" : "Votre produit", => Titre du résumé / sommaire disponible sur la prochaine étape
    "multiple": false, => True = Checkbox ; False = Radio
    "answers": [
        {
            "label": "Véranda",
            "value": "Véranda"
        },
        {
            "label": "Pergola classique",
            "value": "Pergola classique",
            "nextStep": "step-3" => Je peux surcharger l'étape suivante selon un choix (non obligatoire)
        }
    ] => Choix uniques sous forme de bouton radio ou checkbox selon l'option "multiple"
}

Exemple 2 :

{
    "question": "Facultatif : Racontez-nous votre projet",
    "url": "etape2",
    "nextStep": "step-3",
    "summary" : "Votre projet",
    "fields": [
        {
            "type": "textarea",
            "name": "message",
            "required": true,
            "full": true,
            "class": "",
            "label": "Votre projet",
            "placeholder": "Décrivez votre projet",
            "conditional": {
                "key": "product", => nom du champ d'une étape précédente
                "value": "Véranda" => valeur renseignée
            }, => champ conditionel selon une valeur d'une étape précédente
        }
    ]
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.