Formex v0.6.7 Formex.Form
Summary
Functions
Defines the Formex.Form struct
Finds form item by name
Finds form item by struct name
Returns list of Formex.FormCollection.t/0
Returns list of Formex.Field.t/0
Returns list of items which user can control (all except the Button)
Returns list of items which can be validated (alias for get_fields_controllable/1)
Returns list of names of items with changed name (item.name != item.struct_name)
Finds form item by struct_name and returns name
Returns list of Formex.FormNested.t/0
Finds form item by name and returns struct_name
Returns list of Formex.FormNested.t/0 and Formex.FormCollection.t/0
Is controllable (all except the Button)
Adds field to the form. More: Formex.Field.create_field/4, Button.create_button/3
Types
Functions
Defines the Formex.Form struct.
:type- the module that implementsFormex.Type, for example:App.ArticleType:struct- the struct of your data, for example:%App.Article{}:new_struct- the:structwith:paramsapplied:struct_module-struct.__struct__, for example:App.Article:struct_info- additional info about struct, that can differs between implementations ofFormex.BuilderProtocol:items- list ofFormex.Field,Formex.Button,Formex.FormCollectionandFormex.FormNestedstructs:params- sent parameters, passed byPlug.Conn:mapped_params-:paramsprepared to create a:new_structor to create a changeset byFormex.Ecto:phoenix_form-%Phoenix.HTML.Form{}:template- the module that implementsFormex.Template, for example:Formex.Template.BootstrapHorizontal. Can be set via aFormex.View.formex_form_foroptions:template_options:method-:post,:putetc. May be used byFormex.View. E.g.Formex.Ecto.Buildersets here:putif we editingstruct,:postotherwise.:submitted?- is form submitted? Set byFormex.Controller.handle_form/1:opts- additional data passed in a controller. See:Formex.Builder.create_form/5:valid?:errors
Finds form item by name
Finds form item by struct name
Returns list of Formex.FormCollection.t/0
Returns list of Formex.Field.t/0
Returns list of items which user can control (all except the Button)
Returns list of items which can be validated (alias for get_fields_controllable/1)
Returns list of names of items with changed name (item.name != item.struct_name)
get_name_by_struct_name(form :: t, struct_name :: atom) :: atom
Finds form item by struct_name and returns name
Returns list of Formex.FormNested.t/0
Finds form item by name and returns struct_name
Returns list of Formex.FormNested.t/0 and Formex.FormCollection.t/0
Is controllable (all except the Button)