Class: Formize::Definition::FieldSet

Inherits:
Group show all
Defined in:
lib/formize/definition/field_set.rb

Overview

Represents a set of fields which can depend on other fields It can be used with a title

Instance Attribute Summary collapse

Attributes inherited from Group

#html_options, #name, #options

Attributes inherited from FormElement

#children, #depend_on, #form, #html_id, #id, #options, #parent, #unique_name

Instance Method Summary collapse

Methods inherited from Group

#field, #field_set, #fields, #group

Methods inherited from FormElement

#all_elements, #all_fields, #arguments, #dependeds, #dependents, #dependents_on, #hidden_if, #mono_choices, #prototype, #shown_if

Constructor Details

#initialize(form, parent, name = nil, options = {}) ⇒ FieldSet

Returns a new instance of FieldSet.



56
57
58
59
# File 'lib/formize/definition/field_set.rb', line 56

def initialize(form, parent, name=nil, options={})
  super(form, parent, name, options)
  @title = name
end

Instance Attribute Details

#titleObject (readonly)

Returns the value of attribute title.



54
55
56
# File 'lib/formize/definition/field_set.rb', line 54

def title
  @title
end