Wednesday, 12 April 2017

Dynamic Forms with custom validation, should I use NoSQL or SQL for store?

{
    "id": 1, // project id
        "form": [
    {
        "section": [ // each section's a page
            { // questions
                "titles": [], 
                "number": "1", //number of the question
                "description": "",
                "option": {
                    "isHide": false,
                    "isRequired": true
                },
                "input": {
                    "type": "radio", 
                    "contents": [
                        {
                            "text": "radio 1",
                            "value": "1"
                        },
                        {
                            "text": "radio 2",
                            "value": "2"
                        },
                        {
                            "text": "radio 3",
                            "value": "3"
                        }
                    ]
                },
                "conditional-statements": [] //conditional statements, for example: hide this if user click 'yes' on the previous question
            }
        ]
    }
]
}

I'm building a multi-step Dynamic Form with dinamic validations (multiple pages per section, must have previous, back and finish buttons). The user must be able to dynamically create a form too. After, I want to record what the user chose. Would you suggest using NoSql (Mongo) for such task rather than SQL?



via Denali

No comments:

Post a Comment