Forum OpenACS Q&A: Re: setting the richtext format in ad_form

Collapse
Posted by Ola Hansson on
Matthew,

In the edit_request the data should be encode into a list consisting of the contents and the format, like this (there might be a special proc call for this, I'm not sure):

set description [list $description $description_format]

Whenever the form has been submitted (from the initial state or from the edit_request state), the "executing" block such as new_data and edit_data in this case expects $description in the encoded list form. So you should probably decode the list like you've done in the on_submit block in each of those blocks instead and get rid of the on_submit block (or at least what is performed inside of it).

For an example that works, see: http://cvs.openacs.org/cvs/openacs-4/packages/curriculum/lib/element-ave.tcl?view=auto&rev=1.9

HTH

/Ola