- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class ::xowiki::formfield::range
::xowiki::formfield::range create ... \HTML5 range input field. The range input is rendered as a slider by the actual browsers.
[ -CSSclass (default "form-range") ]
Defined in /var/www/openacs.org/packages/xowiki/tcl/form-field-procs.tcl
- 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
Class Relations
::xotcl::Class create ::xowiki::formfield::range \ -superclass ::xowiki::formfield::FormFieldMethods (to be applied on instances)
CSSclass (setter)
initialize (scripted)
:type range set :widget_type textmax (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)
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables