Forum OpenACS Development: template::element::validate does no allow empty value to be saved

hi

we are using the form create/element create syntax to create a form where the user can submit and store personal data ...

I'm not quiet sure it's a bug , but we notice than when a value has been submitted for any field it cannot be clear anymore ( I mean replace by an empty string ) ...

after some investigation we found that the proc template::element::validate ( in packages\acs-templating\tcl\element-procs.tcl )does no allow empty string to be saved

-------------------
so we've made the following changes in the code ...

if { $is_optional && [string equal [lindex $values 0] {}] } {
  #set values [list]
...

if { ! [llength $values] && [info exists element(values)] } {
  #set values $element(values)
}
...

# make the value be the previously submitted value when returning the form
  set element(values) $values
  #added save value even for empty string
  set element(value) $values
--------------------

I 'm just wondering
1 / if someone else has had the same probleme
2 / if someone else found a better way of fixing
3 / if there may be any 'unpredictable' effect to the previous change ...

any idea welcome

Thierry

PS : this also fix another problem ...
checkbox values are not saved if all boxes are unchecked