Class: Glib::JsonUi::ViewBuilder::Fields::Captcha

Inherits:
AbstractField show all
Defined in:
app/helpers/glib/json_ui/view_builder/fields.rb

Overview

Star rating input field.

Provides an interactive star rating interface for collecting user ratings. Supports full and half-star increments with customizable appearance.

Examples:

Rating with full increments

form.fields_rating \
  name: 'user[rating_summary1]',
  value: 1,
  color: 'primary'

Rating with half-star increments

form.fields_rating \
  name: 'user[rating_summary2]',
  value: 1.5,
  halfIncrements: true,
  color: 'secondary'

Rating with custom size

form.fields_rating \
  name: 'user[rating_summary3]',
  value: 2,
  color: 'ternary',
  size: 35

See Also:

  • Garage example

Instance Attribute Summary

Attributes inherited from JsonUiElement

#json, #page

Instance Method Summary collapse

Methods inherited from AbstractField

#autoValidate, #context, #default_url_options, #determine_value, #disableDirtyCheck, #hint, #hint_args, #label, #label_args, #name, #placeholder, #placeholder_args, #prop, #validation, #value

Methods inherited from View

component_name

Methods inherited from JsonUiElement

action, any, array, badgeable, bool, color, component_name, date, date_time, enum, float, hash, icon, #initialize, int, length, menu, panels_builder, #props, required, singleton_array, string, text, url, views

Constructor Details

This class inherits a constructor from Glib::JsonUi::JsonUiElement

Instance Method Details

#createdObject



1091
1092
1093
1094
1095
# File 'app/helpers/glib/json_ui/view_builder/fields.rb', line 1091

def created
  @label = ''
  @placeholder = ''
  super
end