- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class ::xowiki::formfield::FormField
::xowiki::formfield::FormFieldcreate ... \
[ -CSSclass (default "form-control") ] \
[ -form_button_CSSclass (default "btn btn-default") ] \
[ -form_button_wrapper_CSSclass (default "") ] \
[ -form_help_text_CSSclass (default "help-block") ] \
[ -form_item_wrapper_CSSclass (default "form-group") ] \
[ -form_label_CSSclass (default "") ] \
[ -form_widget_CSSclass (default "") ]
Defined in
Class Relations
- class: ::xotcl::Class
- superclass: ::xo::tdom::Object
- subclass: ::xowiki::formfield::number
, ::xowiki::formfield::boolean_image
, ::xowiki::formfield::omit
, ::xowiki::formfield::CompoundField
, ::xowiki::formfield::inform
, ::xowiki::formfield::hidden
, ::xowiki::formfield::label
, ::xowiki::formfield::text
, ::xowiki::formfield::range
, ::xowiki::formfield::ShuffleField
, ::xowiki::formfield::textarea
, ::xowiki::formfield::submit_button
, ::xowf::test_item::td_pretty_value
, ::xowf::Property
, ::xowiki::formfield::file
::xotcl::Class create ::xowiki::formfield::FormField \ -superclass ::xo::tdom::ObjectMethods (to be applied on the object)
fc_decode (scripted, public)
xowiki::formfield::FormFieldfc_decode string
Restore commas encoded in a form-constraint value.
- Parameters:
- string (required)
- Value to decode.
- Returns:
- The decoded value.
- Testcases:
- dict_to_xx
return [string map [list __COMMA__ ,] $string]fc_encode (scripted, public)
xowiki::formfield::FormFieldfc_encode string
Replace commas with the form-constraint placeholder.
- Parameters:
- string (required)
- Value to encode.
- Returns:
- The encoded value.
- Testcases:
- dict_to_xx
return [string map [list , __COMMA__] $string]Methods (to be applied on instances)
dict_to_fc (forward, public)
<instance of xowiki::formfield::FormField> dict_to_fc
Convert a dictionary of field settings to form-constraint syntax.
- See Also:
- Testcases:
- create_test_items
json_value (scripted, public)
<instance of xowiki::formfield::FormField> json_value value
Export a stored value as text, or as an array of strings for a multiple-value field. Unknown field types retain their text values.
- Parameters:
- value (required)
- Stored field value.
- Returns:
- Two-element ns_json type/payload pair; array payloads contain triples.
- Testcases:
- No testcase defined.
if {[:exists multiple] && [:set multiple]} { if {[catch {llength $value}]} { return [list string $value]} set entries {} set i 0 foreach v $value { lappend entries $i string $v incr i } return [list array $entries] } return [list string $value]
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
![[i]](/resources/acs-subsite/ZoomIn16.gif)