formex v0.4.16 Formex.FormCollection

Form collections

To get started see Formex.Type, section Collections of forms.

Functionality that are not mentioned in the link above:

Options

  • delete_field - defaults to :formex_delete. Defines input that will be set to true if we click ×. Behaviours depends on value:

    • :formex_delete - if formex_delete is true, this collection item will be removed.
    • another field - it’s a simple input that may be stored in repo

      For example, we can in our model create removed field. Then set delete_field: :removed option.

Summary

Types

t()
t() :: %Formex.FormCollection{delete_field: term, forms: term, model: term, name: term, opts: term, required: term}

Functions

create(form, type, name, opts)
create(form :: Formex.Form.t, type :: any, name :: Atom.t, opts :: Map.t) :: Formex.Form.t