SmartForm

SmartForm is a hex package to make working with forms in Phoenix LiveView easy and simple while at the same time support complex forms.

Features

Example

# Define the form
defmodule Form do
  use SmartForm

  smart_form do
    field :name, :string, validate: :required
  end
end

# Using the form

Installation

The package can be installed by adding smart_form to your list of dependencies in mix.exs:

def deps do
  [
    {:smart_form, "~> 0.1.0"}
  ]
end

Documentation

API documentation is available at https://hexdocs.pm/smart_form.

Inspiration

SmartForm is inspired by Ecto itself as well as Ash Framework and Data Division.

License

Copyright (c) 2022, Jørgen Orehøj Erichsen

SmartForm source code is licensed under the MIT License.