exhal v7.1.1 ExHal.FormField
Functions for working with HAL form fields.
Link to this section Summary
Functions
Create a new form field from parsed form json
Returns a form field with the specified value
Link to this section Types
Link to this type
field_types()
field_types :: :boolean | :string | :number | :date | :time | :datetime | :sensitive | :hidden | :text | :email | :tel | :file
Field types.
Link to this type
field_value()
field_value :: nil | true | false | list | float | integer | String.t
Possible value types.
Link to this type
t()
t() :: %ExHal.FormField{name: String.t, path: String.t, type: field_types, value: field_value}
A HAL form field.
Link to this section Functions
Create a new form field from parsed form json.
Raises ArgumentError
if json is invalid.
Link to this function
set_value(field, new_value)
set_value(ExHal.FormField.t, field_value) :: ExHal.FormField.t
Returns a form field with the specified value.
Raises ArgumentError
if the new value is the wrong type.