Skip to content
This repository was archived by the owner on Nov 21, 2020. It is now read-only.
This repository was archived by the owner on Nov 21, 2020. It is now read-only.

Add a flexible option #133

Open
Open

Description

@glasserc

I would like to write a question like this:

What is your favorite kind of ice cream?

[ ] chocolate
[ ] vanilla
[ ] other (please specify) ____________

At present, the "option list" only lets you put in fixed values, so this isn't possible yet.

Activity

  1. almet commented on Jun 22, 2016

    @almet
    Member

    I have no idea how I would describe this thing in a JSON schema. Any idea?

  2. Natim commented on Jun 22, 2016

    @Natim
    Member

    I might be possible using an array with multiple types also what most form do is to add an other selection with a comment input after.

  3. glasserc commented on Jun 24, 2016

    @glasserc
    Author

    It's not amazing, but how about:

    {
      "type": "object",
      "title": "Untitled form",
      "description": "Enter some description for your form here",
      "properties": {
        "question_1": {
          "title": "Question 1",
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "option 1",
                "option 2",
                "option 3"
              ]
            },
            {
              "type": "string",
              "title": "Other (please specify)"
            }
          ]
        }
      }
    }
  4. added this to the v2 milestone on Oct 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions