%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::hidden ::xowiki::formfield::hidden check=signature initialize render_help_text render_item ::xowiki::formfield::hidden->::xowiki::formfield::FormField

Class ::xowiki::formfield::hidden

::xowiki::formfield::hidden[i] create ... \
           [ -max_age:integer max_age:integer ] \
           [ -sign:boolean (default "false") ]

Class Relations

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

Methods (to be applied on instances)

  • check=signature (scripted)

    set v 1
    if {[info exists :sign] && ${:sign}} {
      set sig [::xo::cc form_parameter __${:name}_sig]
      set secret [ns_config "ns/server/[ns_info server]/acs" parameterSecret ""]
      set v [ad_verify_signature -secret $secret $value $sig]
      ns_log notice "==== we have sig <$sig> val $v"
    }
    return $v
  • initialize (scripted)

    :type hidden
    set :widget_type text(hidden)
    # remove mixins in case of retyping
    :mixin ""
    if {[info exists :size]} {unset :size}
  • max_age (setter)

  • render_help_text (scripted)

  • render_item (scripted)

    # don't render the labels
    if {[info exists :sign] && ${:sign}} {
      set token_id [sec_get_random_cached_token_id]
      set secret [ns_config "ns/server/[ns_info server]/acs" parameterSecret ""]
      if {[info exists :max_age]} {
        set max_age ${:max_age}
      } else {
        set max_age ""
      }
      set value [:value]
      set sig [ad_sign -max_age $max_age -secret $secret -token_id $token_id $value]
      ::html::div {
        ::html::input -name ${:name} -value $value -type hidden
        ::html::input -name __${:name}_sig -value $sig -type hidden
      }
    } else {
      :render_form_widget
    }
  • sign (setter)

  • validator (setter)