Class ::xowiki::formfield::text

::xowiki::formfield::text[i] create ... \
           [ -maxlength maxlength ] \
           [ -size (default "80") ]

Class Relations

  • class: ::xotcl::Class[i]
  • superclass: ::xowiki::formfield::FormField[i]
  • subclass: ::xowiki::formfield::week[i], ::xowiki::formfield::email[i], ::xowiki::formfield::numeric[i], ::xowiki::formfield::url[i], ::xowiki::formfield::redirect[i], ::xowiki::formfield::tel[i], ::xowiki::formfield::password[i], ::xowiki::formfield::color[i], ::xowiki::formfield::datetime[i], ::xowiki::formfield::h5date[i], ::xowiki::formfield::datetime-local[i], ::xowiki::formfield::h5time[i], ::xowiki::formfield::include[i], ::xowiki::formfield::search[i], ::xowiki::formfield::localized_text[i], ::xowiki::formfield::time[i], ::xowiki::formfield::correct_when[i], ::xowiki::formfield::youtube_url[i], ::xowiki::formfield::image_url[i], ::xowiki::formfield::test_item_name[i]
::xotcl::Class create ::xowiki::formfield::text \
     -superclass ::xowiki::formfield::FormField

Methods (to be applied on instances)

  • add_statistics (scripted)

    next
    if {[dict exists $options word_statistics]} {
      :word_statistics [dict get $options word_statistics]
    }
  • initialize (scripted)

    :type text
    set :widget_type text
    foreach p [list size maxlength] {
      if {[info exists :$p]} {
        set :html($p) [:$p]
      }
    }
  • is_clock_string_p (scripted)

    #
    # Checks if a string is a valid clock string according to
    # specified formats.
    #
    # @see clock
    #
    # @return 1 or 0
    #
    if {$value eq ""} {
      #
      # Empty values are fine here, the field may be optional.
      #
      return 1
    }
    foreach f $formats {
      try {
        clock scan $value -format $f
      } on error {errmsg} {
        ns_log notice  "text instproc is_clock_string_p"  "'$value' is not in clock format '$f'"
      } on ok {d} {
        return 1
      }
    }
    return 0
  • maxlength (setter)

  • render_input (scripted)

    if {[:is_disabled] && [info exists :disabled_as_div]} {
      :render_disabled_as_div text
    } else {
      next
    }
  • size (setter)