# Form view

> Edit a class schema as a form: change a field, add one, and read the ordinary Turtle each change writes back.

Source: https://semvia.io/docs/authoring/form-view

Form view shows each statement in a [Turtle](https://www.w3.org/TR/turtle/) file as a form, and every change you make is written back to the file as ordinary Turtle.

This guide picks up `films.ttl` where [Write Turtle](https://semvia.io/docs/authoring/turtle) left it and edits the Film class schema as a form: it changes one field and adds another.

## Switch the file to Form

Open `films.ttl` and click **Form** at the right of the toolbar. Each statement in the file becomes a card.

Film's card is marked **Class Schema**. Its rows are the parts of a class schema: **Label**, **Description**, **Extends**, **Properties**, **ID template** and **Hidden in graph**. **Properties** lists the three fields from the file, Title, Rights holder, and Release date with a **date** chip.

Figure: Film's card in Form view, headed Film with a Class Schema chip and + Comment, + Above, + Below, Code and Form at its right. It lists Label with a Film chip in en, Description with a chip reading A feature film whose rights the studio licenses to distributors., in en, Extends, Properties with + New and Reuse, then Title, Rights holder and Release date, each a Property shape, Release date carrying a date chip. Below them, an empty ID template field, Hidden in graph switched off with a default badge, and Add field.

Film's card. Each Property shape is one sh:property in the file.

## Change a field

Click **Title** under **Properties** to open it. Its rows are grouped under **Field**, **Value**, **How many**, and **Display and code**: the Label is Title, the Path is `dct:title`, and **Min count** is 1.

Click the Description chip, The name the film is released under. Change the text to `The name the film is released under in its home territory.` and press Enter.

Figure: The Title property shape open under Properties. Under Field: Label with a Title chip in en; Path showing title with a link icon and dct:title at the right; Description with a chip reading The name the film is released under in its home territory., in en. Under Value: empty Type and Class fields. Under How many: Min count 1 and an empty Max count. Under Display and code: Hidden in graph and Secret, both switched off with default badges. Add field sits at the bottom.

The Title field, open. Its Description now reads The name the film is released under in its home territory.

## Add a field

Click **+ New** beside **Properties**. A new Property shape opens below Release date.

1. Click **+** beside **Label**, type `Streaming license` and press Enter. The Path fills in as `streamingLicense`, made from the Label.
2. Click the link icon in **Path**, **Unlink to type your own ID**. Type `dct:license` and press Enter.
3. Click **+** beside **Description**, type `The license the film streams under.` and press Enter.

Figure: Properties lists Title, Rights holder, Release date with a date chip, and Streaming license, each a Property shape. Streaming license is open: Label with a Streaming license chip in en, Path showing license with a link icon and dct:license at the right, and Description with a chip reading The license the film streams under., in en.

The new Streaming license field, with its Path set to dct:license.

## Read the Turtle it wrote

Click **Code** at the right of the toolbar. The Title field's description reads as you changed it, and the form wrote the Streaming license field after Release date as another object of the same `sh:property`, after a [`,`](https://semvia.io/docs/authoring/turtle#read-it-back). `a sh:PropertyShape` says the new resource is a field. This is `films.ttl` on disk.

Graph

Figure: Two cards in Folio's Graph View. films, the file, shows its namespace and conforms to Class Schema. Film, a Class Schema, shows its comment and lists its instance properties Release date (date), Streaming license, Rights holder, and Title (1..*).

All of films.ttl in [Graph View](https://semvia.io/docs/authoring/graph-view): Film now lists Streaming license among its instance properties.

Turtle

```turtle
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix svs: <https://pkg.semvia.io/semvia/core/meta-schema#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix : <https://example.org/my-semantic-package/films#> .

<> dct:conformsTo <https://pkg.semvia.io/semvia/core/profiles/class-schema> ;
.

:Film a svs:ClassSchema ;
  rdfs:label "Film"@en ;
  rdfs:comment "A feature film whose rights the studio licenses to distributors."@en ;
  sh:property [
    sh:path dct:title ;
    sh:name "Title"@en ;
    sh:description "The name the film is released under in its home territory."@en ;
    sh:minCount 1
  ] ;
  sh:property [
    sh:path dct:rightsHolder ;
    sh:name "Rights holder"@en ;
    sh:description "The company that holds the rights to the film."@en ;
    sh:nodeKind sh:IRI
  ] ;
  sh:property [
    sh:path dct:issued ;
    sh:name "Release date"@en ;
    sh:description "The date the film was first released."@en ;
    sh:datatype xsd:date
  ], [
    a sh:PropertyShape ;
    sh:name "Streaming license"@en ;
    sh:path dct:license ;
    sh:description "The license the film streams under."@en
  ]
.
```

## Edit one statement as a form

You don't have to switch the whole file. In Code view, each statement has **Edit resource** above it. Click the one above `:Film` and only that statement turns into a form, in place. The **Code** button at its right turns it back.

Figure: films.ttl with the toolbar on Code and the profile reading Class Schema. The six @prefix lines and the <> dct:conformsTo statement are Turtle, with Edit resource above the statement. Below them, Film is shown as a form with a Class Schema chip and + Comment, Code and Form at its right: Label Film, Description A feature film whose rights the studio licenses to distributors., Extends, Properties listing Title, Rights holder, Release date with a date chip, and Streaming license, then ID template, Hidden in graph with a default badge, and Add field.

Edit resource opens one statement as a form; the rest of the file stays Turtle.

[Next: Graph View](https://semvia.io/docs/authoring/graph-view): How Graph View draws a file as nodes and edges, with a resource's types, values, lists and blocks inside its node.
