xowiki::FormPage instproc load_values_into_form_fields (public)
<instance of xowiki::FormPage> load_values_into_form_fields \ form_fields
Defined in /var/www/openacs.org/packages/xowiki/tcl/xowiki-www-procs.tcl
Load either the instance variables or the instance attributes into the provided form-fields. The function sets the values based on the default values and the values for the current object.
- Parameters:
- form_fields (required)
- Testcases:
- create_form_with_form_instance, create_form_with_numeric
Source code: set is_new [:is_new_entry ${:name}] foreach f $form_fields { set att [$f name] switch -glob $att { __* {} _* { set varname [string range $att 1 end] :combine_data_and_form_field_default $is_new $f [set :$varname] } default { #:log "load_values_into_form_field $att" "exists [dict exists ${:instance_attributes} $att]" "in [dict keys ${:instance_attributes}]" if {[dict exists ${:instance_attributes} $att]} { :combine_data_and_form_field_default $is_new $f [dict get ${:instance_attributes} $att] } } } }XQL Not present: Generic, PostgreSQL, Oracle