Forum OpenACS Development: Re: Rendering input type checkbox with template::element::create

Brian,

Yes, the forum has mangled the HTML I tried to describe.

Basically, what I tried to show here is that depending on the context the ad_proc [template::element::create] changes its behavior for checkbox input type.

I mean, if I call [template::element::create] directly on a .TCL page it works fine. However, if I call it within an ad_proc as in:

ad_proc -public iuri::append_field_to_form { ...} {
...
template::element::create $form_id milestone_p \
-datatype "text" "" \
-widget checkbox \
-label "Miletone" \
-options "{\"\" t}" \
-custom "" \
-html ""
...

the html page in the end doesn't recognize the input element as an html tag and it displays as in

"&lt"input type="checkbox&quot name="release_item_p" value="t&quot id="project_filter:elements:release_item_p:t"""">" "&lt"a href='/intranet-dynfield/attribute-new?attribute%5fid=29046&return%5furl=%2fintranet%2fprojects%2findex%3ffilter%255fadvanced%255fp%3d1%26return%255furl%3d%252fintranet%252fprojects%252f'"&gt"&lt"img src='/intranet/images/navbar_default/wrench.png' border=0 title='' alt=''"&gt""&lt"/a"&gt"

The feeling I had was like a "noquote" was missing as in @tcl_var;noquote@ but [template::element::create] doesn't return anything it just writes the HTM code along the page. *if you know what I mean

I also try to use ad_return_template but it didn't work either.

Any clues?