SurfaceBulma.Form (surface_bulma v0.3.3)
The form component that wraps the inputs.
Properties
for :any, required: true - Atom or changeset to inform the form data
action :string, default: "#" - URL to where the form is submitted
as :atom - The server side parameter in which all parameters will be gathered.
method :string - Method to be used when submitting the form.
multipart :boolean, default: false - When true, sets enctype to "multipart/form-data". Required when uploading files.
csrf_token :any - For "post" requests, the form tag will automatically include an input tag with name _csrf_token. When set to false, this is disabled.
trigger_action :boolean - Trigger a standard form submit on DOM patch to the URL specified in the form's standard action attribute. This is useful to perform pre-final validation of a LiveView form submit before posting to a controller route for operations that require Plug session mutation.
errors :keyword - Keyword list of errors for the form.
opts :keyword, default: [] - Keyword list with options to be passed down to
Phoenix.HTML.Tag.tag/2
class :css_class - Class or classes to apply to the form
Slots
- default, args: [:form]
Events
- change - Triggered when the form is changed
- submit - Triggered when the form is submitted
- auto_recover - Triggered when the form is being recovered. Use this event to enable specialized recovery when extra recovery handling on the server is required.
Link to this section Summary
Functions
Callback implementation for Surface.Component.render/1
.
Link to this section Functions
included_props(assigns)
render(assigns)
Callback implementation for Surface.Component.render/1
.