Form Model example

In trying to understand forms by looking at https://solid.github.io/solid-ui/Documentation/forms-intro.html, it helps to have an example ui ontology instance, which is what I think is called a form model, an example of which is here https://github.com/inrupt/solid-react-components/blob/4a17d0bdf0ec53542c0c5f79343ae1e9517dd310/src/lib/components/FormModel/form-model-example.json

I’m still trying to understand it, especially what a ui:Classifier is…

1 Like

We’ve put together a document outlining each of the form language field types, including classifier. I don’t think I can link directly to the subheader but it should be easy to find.

The very brief summary is Classifier is a field where you select from a list of values (e.g. a dropdown or radio button list). We implemented a Classifier as a dropdown list. It can pull values from a hardcoded list or have them be generated from the subclasses of a given class in an ontology.

2 Likes

You can find a ui:Classifier Form Model example at https://solidsdk.inrupt.net/public/FormLanguage/examples/FormModel/Classifier-subtypes.ttl

In addition to solid UI, can also render Form Models using the React SDK Generator:

  1. Open https://develop.generator.inrupt.com/ (this a a development version which will be released to production in a week or so).
  2. Login
  3. Select Menu -> Form Model Render
  4. Enter:
  5. Click ‘Generate’.

You should see a form where you can enter phone numbers including a phone type ui:classifer.

You can also see ui:classifiers in the User Profile form model (https://solidsdk.inrupt.net/sdk/userprofile.ttl)

3 Likes

Thanks. I’m wondering what the ShEx Layout field is for…I assume its a file, maybe a css file? Do you have an example? Or some documentation or links…

The ShEx Layout field was included in anticipation of an extension to ShEx that allows some form layout information to be included in an optional “layout” file. Based on the fact that the Form Model generated from a ShEx shape can be edited, this field is now obsolete and can be ignored.

2 Likes