Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarification Needed: Simple Boolean Field (using Tabs) #81

Open
lbispham opened this issue Mar 13, 2018 · 0 comments
Open

Clarification Needed: Simple Boolean Field (using Tabs) #81

lbispham opened this issue Mar 13, 2018 · 0 comments

Comments

@lbispham
Copy link

lbispham commented Mar 13, 2018

Description

I would like a simple boolean field (a single checkbox) for a field called "Enabled".

booleancheckbox

In Angular Schema Form, I can accomplish this with the following:

boolean

I don't want to use the Checkboxes or RadioBox components here because in this case they are overkill

toomuch

I just want to have my boolean field appear in the form.

DisplayAllFields doesn't appear to be released yet but even if it were, it seems to have no effect on tabs (which I need to use). I forked the code and ran the TabbedFormTest unit test. I removed the @Textfield annotation from the lastName field but added @DisplayAllFields to the form.

displayallfieldstabs

I ended up with the following output:

{
    "schema": {
    "type": "object",
    "id": "urn:jsonschema:io:asfjava:ui:core:schema:TabbedForm"
  },
  "form": [
    {
      "type": "tabs",
      "tabs": [
        {
          "title": "Info",
          "items": [
            {
              "key": "firstName",
              "description": "This is a description for your first name field",
              "placeholder": "Your first name"
            },
            null
          ]
        },
        {
          "title": "Contact",
          "items": [
            {
              "key": "email",
              "description": "This is Text Field with pattern and validation message",
              "placeholder": "Your email",
              "validationMessage": "Your mail must be in this format [email protected]"
            }
          ]
        }
      ]
    },
   {
      "key": "webSite",
      "description": "This is TextField with fieldAddonLeft",
      "fieldAddonLeft": "http:\/\/"
    }
  ]
}

Expected behavior: [What you expect to happen]

I think what I'm looking for is an annotation for a single field something like "DisplayInForm" that will place the field into the form (or into the tabs). Kind of like a singular version of DisplayAllFields (that will work with tabs). Is there another way to do this that I've missed?

Thanks!

Versions

1.0.1

Additional Information

Any additional information, configuration or data that might be necessary to reproduce the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant