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

#controlString

HTML for the field.

Returns:

  • (String)

#control_with_placeholderString

HTML for the field with an HTML placeholder attribute.

Returns:

  • (String)

#field_labelString

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

Returns:

  • (String)

#has_placeholderBoolean

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)

#labelString

Returns:

  • (String)

#requiredBoolean

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_labelBoolean

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)

#typeString

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

Returns:

  • (String)