Sha256: 6190ac02e7fcb5a1f866ad53c41c1ceb7d1325486fdff89e88fdde5faee3d27d
Contents?: true
Size: 1.23 KB
Versions: 146
Compression:
Stored size: 1.23 KB
Contents
# frozen_string_literal: true # :nodoc: class FriendForm < ApplicationForm form do |friend_form| friend_form.group(layout: :horizontal) do |name_group| name_group.text_field(name: "first_name", label: "First Name") name_group.text_field(name: "last_name", label: "Last Name") end end end # :nodoc: class FriendTextAreaForm < ApplicationForm form do |friend_text_area_form| friend_text_area_form.text_area( name: "description", label: "Describe this wonderful person in loving detail" ) end end # :nodoc: class RadioButtonWithNestedForm < ApplicationForm form do |radio_form| radio_form.radio_button_group(name: "channel") do |radio_group| radio_group.radio_button(value: "online", label: "Online advertisement", caption: "Facebook maybe?") radio_group.radio_button(value: "radio", label: "Radio advertisement", caption: "We love us some NPR") radio_group.radio_button(value: "friend", label: "From a friend", caption: "Wow, what a good person") do |friend_button| friend_button.nested_form do |builder| Primer::Forms::FormList.new( FriendForm.new(builder), FriendTextAreaForm.new(builder) ) end end end end end
Version data entries
146 entries across 146 versions & 2 rubygems