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

simple subfields #296

Open
fostermh opened this issue Aug 26, 2021 · 3 comments · May be fixed by #297
Open

simple subfields #296

fostermh opened this issue Aug 26, 2021 · 3 comments · May be fixed by #297

Comments

@fostermh
Copy link

it seems to me there is support for repeating subfields but not subfields that are not repeating. I find it very convenient to organize the schema to support subfields.

example:

  {
      "field_name": "vertical-extent",
      "label": "Vertical Extent",
      "simple_subfields": [{
          "field_name": "min",
          "label": "Min",
          "form_attrs":{"pattern":"[0-9.]+"}
        },
        {
          "field_name": "max",
          "label": "Max",
          "form_attrs":{"pattern":"[0-9.]+"}
        }
      ]
    }

While this could be done with two fields it is more obvious to users that the min and max values are related when grouped as subfields.

@fostermh fostermh linked a pull request Aug 26, 2021 that will close this issue
@Mohab25
Copy link

Mohab25 commented May 7, 2022

@fostermh hi Matthew, is the simple_subfields added? when i use it, my inputs get disappeared

@fostermh
Copy link
Author

fostermh commented May 9, 2022

Hi @Mohab25, I'm not sure what you mean? The pull request to merge this feature into master is still open so no it has not been added to the default branch if that is what you are asking. or do you mean you are testing #297 and it is not working for you?

@fostermh
Copy link
Author

turns out the PR was broken. I think it is working now.

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

Successfully merging a pull request may close this issue.

2 participants