View Source Surface.Components.Form.Inputs (surface v0.11.4)

A wrapper for Phoenix.HTML.Form.html.inputs_for/3.

Additionally, adds the generated form instance that is returned by inputs_for/3 into the context, making it available to any child input.

Properties

  • form :form, from_context: {Form, :form} - The parent form.

It should either be a Phoenix.HTML.Form emitted by form_for or an atom.

  • for :any, from_context: {Field, :field} - An atom or string representing the field related to the child inputs.

  • opts :keyword, default: [] - Extra options for inputs_for/1.

See Phoenix.Component.inputs_for/1 for the available options.

Slots

  • default, arg: %{form: :form, index: :integer} - The code containing the input controls

Summary

Functions

Callback implementation for Surface.Component.render/1.