1 # Form CRUD: Updating forms via programmatic API
3 Now that we've defined a baseline form, it's possible for administrators and
4 GUI applications to inspect the form using the API:
7 $ cv api4 afform.get +w name=helloworld
17 "server_route": "civicrm/hello-world",
21 "Hello {{routeParams.name}}"
28 Additionally, you can also update the forms:
31 $ cv api4 afform.update +w name=helloworld +v title="The Foo Bar Screen"
35 "title": "The Foo Bar Screen"
40 A few important things to note about this:
42 * The changes made through the API are only applied on this site.
43 * Once you make a change with the CRUD API, there will be two copies of the form:
44 * `[myextension]/afform/helloworld/` is the default, canonical version.
45 * `[civicrm.files]/afform/helloworld/` is the local, custom version.
46 * The `layout` field is stored as an Angular-style HTML document (`layout.html`), so you can edit it on disk like
47 normal Angular code. However, when CRUD'ing the `layout` through the API, it is presented in JSON-style.