xowf::test_item::Question_manager method percent_substitute_in_form (public)

 <instance of xowf::test_item::Question_manager[i]> percent_substitute_in_form \
    [ -obj obj ] [ -form_obj form_obj ] [ -position position ] html

Defined in packages/xowf/tcl/test-item-procs.tcl

Perform percent substitution in the provided HTML, form_constraints and disabled_form_constraints and return the result as a dict.

Switches:
-obj
(optional)
-form_obj
(optional)
-position
(optional)
Parameters:
html

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_composite_test_item create_composite_test_item (test xowf) xowf::test_item::Question_manager instproc percent_substitute_in_form xowf::test_item::Question_manager instproc percent_substitute_in_form test_create_composite_test_item->xowf::test_item::Question_manager instproc percent_substitute_in_form

Testcases:
create_composite_test_item
Source code:
set form_name [$form_obj name]
set seed [lindex [$obj property seeds] $position]
set substvalues [$form_obj property substvalues]
#ns_log notice "CHECK-AA $form_name seed <$seed> // seeds <[$obj property seeds]> // subs '$substvalues'"

set fc [$form_obj property form_constraints]
set dfc [$form_obj property disabled_form_constraints]

if {$seed eq "" && $substvalues ne ""} {
  ns_log warning "percent_substitute_in_form cannot substitute percent variables in $form_name"
} else {
  if {$substvalues ne ""} {
    set html [:percent_substitute  -seed $seed  -substvalues $substvalues  $html]
    set fc [:percent_substitute  -seed $seed  -substvalues $substvalues  $fc]
    set dfc [:percent_substitute -verbose  -seed $seed  -substvalues [$form_obj property substvalues]  $dfc]
  }
}
return [list form $html form_constraints $fc disabled_form_constraints $dfc]
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: