This is the demo site for Forme. Forme is a HTML forms library for ruby with the following goals:
Note that as Forme is just an HTML forms library, the forms on this demo site are for display purposes only, you can't submit them.
These are basic model forms showing many field types and multiple association types. All pages in this section use the same template, with different options per page. The differences between some of these links are not visually obvious, you are encouraged to view the source of the page to see the markup differences.
These show nested associations support.
Forme supports Bootstrap 5 form output.
Raise an issue if anything is wrong or missing in this support.
All examples use the same database schema, created by this Sequel code:
module FormeDemo
DB.create_table?(:artists) do
primary_key :id
String :name, :null=>false, :unique=>true
end
DB.create_table?(:albums) do
primary_key :id
String :name, :null=>false
foreign_key :artist_id, :artists, :null=>false
Date :release_date, :null=>false
DateTime :release_party_time, :null=>false
Integer :copies_sold, :null=>false, :default=>0
TrueClass :debut_album, :null=>false
TrueClass :out_of_print
index [:name, :artist_id], :unique=>true
end
DB.create_table?(:tracks) do
primary_key :id
Integer :number, :null=>false
String :name, :null=>false
foreign_key :album_id, :albums
Float :length
end
DB.create_table?(:tags) do
primary_key :id
String :name, :null=>false, :unique=>true
end
DB.create_table?(:albums_tags) do
foreign_key :album_id, :albums
foreign_key :tag_id, :tags
primary_key [:album_id, :tag_id]
end
end
This demo site is part of the Forme repository, so if you want to know how it works, you can review the source.