Forum OpenACS Development: ad_page_contract - multple changes

Collapse
Posted by Leo Guzynski on
Under oacs532 I notice in acs-tcl/tcl/tcl-documentation-procs.tcl the following code:

if { [info exists apc_internal_filter($formal_name:multiple)] && [empty_string_p $actual_value] } {
# LARS:
# If you lappend an emptry_string, it'll actually add the empty string to the list as an element
# which is not what we want
continue
}

Here is what happens: If you have a page with three elements called foo, fill in two of them, then your muliple list has only two elements. Prior (and expected) behavior would set empty string for the missing element(s).

My fix is to comment out this code and I return to my oacs463 behavior. HOWEVER I would like to know if there are other internal reasons to have this code not return empty string.

Collapse
Posted by Dave Bauer on
I think this would be a problem with code that uses multiple with checkboxes and expects only a list of selected elements not a list of all the elements, with the value set for those that were selected.

I suggest you could create a new flag to create the behavior you need, or just change your local install. If you put a new flag it might be easier to merge/upgrade in the future.