%3 ::xowiki::formfield::FormField ::xowiki::formfield::FormField → fc_decode → fc_encode → get_from_name → get_single_spec → interprete_condition CSSclass_list_add add_statistics answer_check=AND answer_check=answer_words answer_check=btwn answer_check=contains answer_check=contains-not answer_check=eq answer_check=ge answer_check=gt answer_check=in answer_check=le answer_check=lt answer_check=match answer_is_correct asWidgetSpec behavior booleanAttributes config_from_spec convert_to_external convert_to_internal describe dict_to_fc dict_to_spec dict_value escape_message_keys field_value handle_transmit_always has_instance_variable init initialize interprete_single_spec is_disabled is_repeat_template_p leaf_components localize make_correct pretty_image pretty_value process_correct_when_modifier remove_omit render render_answer_statistics render_collapsed render_disabled_as_div render_error_msg render_form_widget render_help_text render_input render_item render_localizer render_modal render_result_statistics render_word_statistics repeat repeat_add_label resetBooleanAttributes reset_on_validation_error reset_parameter same_value set_disabled set_feedback set_is_repeat_template stats_record_count validate validation_check value_if_nothing_is_returned_from_form word_statistics ::xo::tdom::Object ::xo::tdom::Object render ::xowiki::formfield::FormField->::xo::tdom::Object ::xo::tdom::AttributeManager ::xo::tdom::AttributeManager ::xo::tdom::Object->::xo::tdom::AttributeManager ::xo::OrderedComposite ::xo::OrderedComposite ::xo::tdom::Object->::xo::OrderedComposite ::xowiki::formfield::range ::xowiki::formfield::range initialize render_input ::xowiki::formfield::range->::xowiki::formfield::FormField

Class ::xowiki::formfield::range

::xowiki::formfield::range[i] create ... \
           [ -CSSclass (default "form-range") ]

HTML5 range input field. The range input is rendered as a slider by the actual browsers.
Documented Parameters:
min
minimum value of the value range
max
maximum value of the value range
step
increment steps when moving the slider
with_output
add an output box with show the actual slider value (requires JavaScript)
output_prefix
prepend string value to the actual slider value in the output display
output_suffix
append string value to the actual slider value in the output display
Defined in /var/www/openacs.org/packages/xowiki/tcl/form-field-procs.tcl

Class Relations

  • class: ::xotcl::Class[i]
  • superclass: ::xowiki::formfield::FormField[i]
::xotcl::Class create ::xowiki::formfield::range \
     -superclass ::xowiki::formfield::FormField

Methods (to be applied on instances)

  • CSSclass (setter)

  • initialize (scripted)

    :type range
    set :widget_type text
  • max (setter)

  • min (setter)

  • output_prefix (setter)

  • output_suffix (setter)

  • render_input (scripted)

    set atts [:get_attributes type id name value {CSSclass class} min max step value  autofocus autocomplete formnovalidate multiple pattern placeholder readonly required]
    if {[:is_disabled]} {lappend atts {*}"disabled 1"}
    ::html::input $atts {}
    if {${:with_output}} {
      set :for ${:id}
      set :outputID ${:id}-output
      :CSSclass_list_add CSSclass ${:name}
      ::html::output [:get_attributes for {outputID id} {CSSclass class}] {
        ::html::t "${:output_prefix}${:value}${:output_suffix}"
      }
      set output_value [subst {'${:output_prefix}' + event.srcElement.value + '${:output_suffix}'}]
      template::add_event_listener  -id ${:id}  -event input  -preventdefault=false  -script "document.getElementById('${:outputID}').value = $output_value;"
    }
  • step (setter)

  • value (setter)

  • with_output (setter)