Skip to content

Configurable field order #76

@jonathonadler

Description

@jonathonadler

Currently, it is only possible to output fields in order [label, input, error]. My project CSS required the label to be rendered after the input field i.e. [input, label, error].

I had to override the whole formulator module to overcome this:

  defp build_input_and_associated_tags(form, field, label_options, fun) do
    error = HtmlError.html_error(form, field)
    [
      fun.(error),
      build_label(form, field, label_options), # JA, swap label position
      error.html
    ]
    |> Enum.reject(&(is_nil(&1)))
  end

It would be great if order was configurable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions