template::util::spellcheck::merge_text (public)

 template::util::spellcheck::merge_text element_id

Defined in packages/acs-templating/tcl/spellcheck-procs.tcl

Returns the merged (possibly corrected) text or the empty string if it is not time to merge.

Parameters:
element_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 template::data::transform::spellcheck template::data::transform::spellcheck (public) template::util::spellcheck::merge_text template::util::spellcheck::merge_text template::data::transform::spellcheck->template::util::spellcheck::merge_text

Testcases:
No testcase defined.
Source code:

    set __form__ [ns_getform]
    set merge_text [ns_set get $__form__ $element_id.merge_text]
    ns_set delkey $__form__ $element_id.merge_text

    if { $merge_text eq "" } {

        return {}
    }

    # loop through errors and substitute the corrected words for #errnum#.
    set i 0
    while { [ns_set find $__form__ $element_id.error_$i] != -1 } {
        regsub "\#$i\#" $merge_text [ns_set get $__form__ $element_id.error_$i] merge_text
        ns_set delkey $__form__ $element_id.error_$i
        incr i
    }

    ns_set cput $__form__ $element_id $merge_text
    ns_set cput $__form__ $element_id.spellcheck ":nospell:"
    return $merge_text
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: