Formex v0.6.7 Formex.FormCollection

Form collections

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

Functionality that are not mentioned in the link above:

Options

  • type - module that implements Formex.Type. Required
  • struct_module - module of struct, e.g. App.UserAddress
  • 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, name: term, opts: term, struct_module: term, struct_name: term, type: term, validation: term}