Forum OpenACS Development: Re: Widgets h5date and h5time : html attribute values are duplicated

Dear Khy,

thanks for your feedback, I have better documented the behavior of the proc in https://cvs.openacs.org/changelog/OpenACS?cs=MAIN%3Aantoniop%3A20250207102955

If the change works for you, given that it is simple enough, I would prefer it to going after the various tag_attributes fiddlings we have in the code.

I agree that consuming element(html) is controversial from a logical standpoint, as this is a property of the widget itself and not some volatile value. A different approach could be to flip the merging logics, so that we do not return a new dict, but set the result of the merge into element(html) and use that instead...

If you come up with a better approach, feel free to provide a patch 😊

Ciao

Antonio

Thank you for adding the documentation and fix.

On the other two widgets checkbox_text ( template::widget::select_text) and radio_text ( template::widget::radio_text)
Does the call to widget::input pass in 'attributes' instead of tag_attributes to build the 'other' input?

==========
append output "$element(other_label): "
set element(value) $text
set element(name) $element(name)\.text
- append output [template::widget::input text element $tag_attributes]
+ append output [template::widget::input text element $attributes]
============