<% content_for :heading do %> <%= cell "decidim/announcement", "This page comes from a legacy view. Content is outdated.", callout_class: "alert" %> Forms <% end %> <% content_for :toc do %> HTML regular inputs Help texts Disabled Errors Min/Max length Emojis <% end %> <% text_types = [ "date", # "datetime-local", # "email", # "month", "number", "password", # "search", # "tel", "text" # "time", # "url", # "week" ] options_types = %w(checkbox radio) %>

HTML regular inputs

<%= cell "decidim/announcement", "Only displays common types, full available list: date, datetime-local, email, month, number, password, search, tel, text, time, url, week" %> <% text_types.each do |element| %> <% end %> <% options_types.each do |element| %>
fieldset [legend] <% 3.times do |i| %> <% end %>
<% end %>

Help texts

<% text_types.each do |element| %> <% end %> <% options_types.each do |element| %>
fieldset [legend] Lorem ipsum dolor sit amet consectetur adipisicing elit. Dignissimos hic quos omnis vero aspernatur architecto! <% 3.times do |i| %> <% end %>
<% end %>

Disabled

<% text_types.each do |element| %> <% end %> <% options_types.each do |element| %>
fieldset [legend] <% 3.times do |i| %> <% end %>
<% end %>

Errors

<%= cell "decidim/announcement", "Does not apply for select" %> <% text_types.each do |element| %> <% end %> <% options_types.each do |element| %>
fieldset [legend]
Lorem ipsum dolor sit amet.
<% 3.times do |i| %> <% end %>
<% end %>

Min/Max length

<%= cell "decidim/announcement", "Only works for input type='text' and textarea" %>

Emojis

<%= cell "decidim/announcement", "Only works for textarea" %>