formex v0.1.4 Formex.Form

Summary

Functions

Defines the Formex.Form struct

Types

t()
t() :: %Formex.Form{changeset: term, fields: term, model: term, params: term, phoenix_form: term, struct: term, type: term}

Functions

__struct__()

Defines the Formex.Form struct.

  • :type - the module that implements Formex.Type, for example: App.ArticleType
  • :struct - the struct that will be used in Ecto.Changeset.cast, for example: %App.Article{}
  • :model - struct.__struct__, for example: App.Article
  • :fields - list of Formex.Field structs
  • :params - params that will be used in Ecto.Changeset.cast
  • :changeset - %Ecto.Changeset{}
  • :phoenix_form - %Phoenix.HTML.Form{}
put_field(form, field)
put_field(t, Formex.Field.t) :: t

Adds field to form. More: Formex.Field.create_field/4