question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Nested and conditional fields

See original GitHub issue

Hi, very practical package.

I have checked documentation and live examples but could not find solutions for my questions. Maybe I missed it.

1- Is it possible to have nested form fields. My intention is only for generating wrappers for some form fields in HTML. I need to have the following schema.

schema: {
    fields: [{
        type: "group",
        label: "Group 1",
        fields: [
            {
                type: "input",
                inputType: "text",
                label: "Name",
                model: "name",
                placeholder: "Your name",
                featured: true,
                required: true
            },
            {
                type: "input",
                inputType: "password",
                label: "Password",
                model: "password",
                min: 6,
                required: true,
                hint: "Minimum 6 characters",
                validator: VueFormGenerator.validators.string
            }
        ]
    },{
        type: "group",
        label: "Group 2",
        fields: [
            {
                type: "select",
                label: "skills",
                model: "type",      
                values: ["Javascript", "VueJS", "CSS3", "HTML5"]
            },{
                type: "input",
                inputType: "email",
                label: "E-mail",
                model: "email",
                placeholder: "User's e-mail address"
            },{
                type: "checkbox",
                label: "Status",
                model: "status",
                default: true
            }
        ]
    }]
}

2- What about conditional form fields? For example if I enable a switch, several other form fields will be visible.

Thanks in advance,

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
icebobcommented, May 29, 2017

I hope in this week.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nested conditionals (if/else/if) | AP CSP (article) | Khan Academy
Imagine a program that reports whether a number is positive, negative, or zero. That program needs to select from 3 paths. The flowchart...
Read more >
Nested Conditional Logic Limitations
Nested conditional logic will work if the conditional field does not have a default value, is not dynamically populated, and, if the field...
Read more >
Conditional Fields Depending on ... - Woodpecker Help Center
Conditional fields : create seamless client experiences with Woodpecker ... Conditional Fields Depending on Other Conditional Fields (Nested Conditionals) ...
Read more >
Nested IF Fields - A method to create them
Operator is the test condition and should come back as true or false. A field is "nested" when that field is used inside...
Read more >
nested groups - Conditional Fields for CF7
nested groups. You can create groups inside another group. For example: ... Conditional Fields (Text). show [subcat2-2] if [select-subcat-2] equals "subcat ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found