Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Background

We've already discussed how to add hypermedia to a resource using the standard HAL _links and _embedded reserved properties. These properties will cover the majority of your hypermedia needs. However, in this same article we introduced the AddFormAction service to address hypermedia requirements that go beyond the design intent of the _links and _embedded properties.

...

To help visualize the _forms structure, here is a general outline:


Info
iconfalse

_forms

...

  • form action 1
    • method
    • action
    • title
    • fields
      • field

...

      •  1
        • default
        • required
        • visible
      • field

...

      •  2
        • default
        • required
        • visible

...

  • form action 2
    • method
    • action
    • title
    • fields
      • field

...

      •  1
        • default
        • required
        • visible
      • field

...

      •  2
        • default
        • required
        • visible

Using the AddFormAction Service

With our background out of the way, we can now demonstrate how to call the AddFormAction service. To make this easy, we'll implement the form action that appears in the above example:

...