Class: FormFieldDrop

Inherits:
Liquid::Simplero::Drop show all
Defined in:
app/drops/form_field_drop.rb

Overview

Represents a form field. Can be accessed as a setting under ThemeSettingsDrop.

Direct Known Subclasses

LandingPageEditorFormFieldDrop

Instance Method Summary collapse

Methods inherited from Liquid::Simplero::Drop

#dom_id

Instance Method Details

#control ⇒ String

HTML for the field.

Returns:

  • (String)

#control_with_placeholder ⇒ String

HTML for the field with an HTML placeholder attribute.

Returns:

  • (String)

#field_label ⇒ String

Same as label, but adds an indicator for required fields.

Returns:

  • (String)

#has_placeholder ⇒ Boolean

Returns true if the field has an HTML placeholder.

Returns:

  • (Boolean)

#has_placeholder? ⇒ Boolean

Returns true if the field has an HTML placeholder.

Returns:

  • (Boolean)

#label ⇒ String

Returns:

  • (String)

#required ⇒ Boolean

Returns:

  • (Boolean)

#required? ⇒ Boolean

Returns:

  • (Boolean)

#self_labeling? ⇒ Boolean

Returns true if the field type does not need a separate HTML label (e.g. a checkbox)

Returns:

  • (Boolean)

#show_label ⇒ Boolean

Returns true if an HTML label should be shown.

Returns:

  • (Boolean)

#show_label? ⇒ Boolean

Returns true if an HTML label should be shown.

Returns:

  • (Boolean)

#type ⇒ String

The type of field (text, checkbox, etc.)

Returns:

  • (String)