xo::ConnectionContext instproc form_parameter

 <instance of xo::ConnectionContext[i]> form_parameter

Defined in

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_workflow_with_instance create_workflow_with_instance (test ) xo::ConnectionContext instproc form_parameter xo::ConnectionContext instproc form_parameter test_create_workflow_with_instance->xo::ConnectionContext instproc form_parameter test_xowf xowf (test ) test_xowf->xo::ConnectionContext instproc form_parameter test_xowiki_test_cases xowiki_test_cases (test xowiki) test_xowiki_test_cases->xo::ConnectionContext instproc form_parameter xo::validate_parameter_constraints xo::validate_parameter_constraints (public) xo::ConnectionContext instproc form_parameter->xo::validate_parameter_constraints

Testcases:
create_workflow_with_instance, xowf, xowiki_test_cases
Source code:
:require_form_parameter

set name $spec
regexp {^([^:]+):(.*)$} $spec . name constraint

if {[info exists :form_parameter($name)]} {
  if {[info exists :form_parameter_multiple($name)]} {
    set value [set :form_parameter($name)]
  } else {
    set value [lindex [set :form_parameter($name)] 0]
  }
  if {[info exists constraint]} {
    set r [xo::validate_parameter_constraints $name $constraint $value]
    if {$r ne $value} {
      ns_log notice "converting value checker: form parameter validate <$spec> -> '$value' -> '$r'"
      set value $r
    }
  } else {
    #:msg "FORM_PARAMETER spec <$spec> no constraint -> '$value'"
  }
  return $value
} else {
  return $default
}
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: