ckanext-scheming icon indicating copy to clipboard operation
ckanext-scheming copied to clipboard

simple subfields

Open fostermh opened this issue 4 years ago • 7 comments

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 avatar Aug 26 '21 18:08 fostermh

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

Mohab25 avatar May 07 '22 23:05 Mohab25

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 https://github.com/ckan/ckanext-scheming/pull/297 and it is not working for you?

fostermh avatar May 09 '22 22:05 fostermh

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

fostermh avatar May 10 '22 04:05 fostermh