- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class ::xowiki::formfield::short_text_field
::xowiki::formfield::short_text_field create ...
Class Relations
::xotcl::Class create ::xowiki::formfield::short_text_field \ -superclass ::xowiki::formfield::TestItemFieldMethods (to be applied on instances)
initialize (scripted)
if {${:__state} ne "after_specs"} return # # Create component structure. # set widget [test_item set richtextWidget] # # Get "auto_correct" from the interaction (passing "auto_correct=" # via form constrain would require to extend the RepeatContainer, # otherwise the attribute is rejected). # set p [:info parent] while {1} { if {![$p istype ::xowiki::formfield::FormField]} break if {![$p istype ::xowiki::formfield::short_text_interaction]} { set p [$p info parent] continue } set :auto_correct [$p set auto_correct] break } set render_hints [join { "{#xowiki.number# number}" "{#xowiki.single_word# single_word}" "{#xowiki.multiple_words# multiple_words}" "{#xowiki.multiple_lines# multiple_lines}" "{#xowiki.file_upload# file_upload}" } " "] # # The options field is made "required" to avoid deselecting. # set textEntryConfigSpec [subst { {options {radio,horizontal=true,form_item_wrapper_CSSclass=form-inline,options=$render_hints,value=multiple_words,required,label=#xowf.answer#}} {lines {number,form_item_wrapper_CSSclass=form-inline,value=1,min=1,label=#xowf.lines#}} }] :create_components [subst { {text {$widget,height=100px,label=#xowf.sub_question#,plugins=OacsFs}} $textEntryConfigSpec [:correct_when_spec] {solution {textarea,rows=2,label=#xowf.Solution#}} }] set :__initialized 1
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables