I have the forums message/post code changed to use ad_form to adhere to new standards. Now I need some heavy user to take a look at it as I don't want to commit right before a .LRN release.
Furthermore I found the ultimate double click protection thanks to Dave. I disable the button after submitting. Sadly this breaks template::form::get_button, which, funny as it is , is only used by forums message/post.
So noone seems to make use of the functionality to have multiple edit buttons (OK/Cancel work just fine) and depend the action on the name of the formbutton.
Not sure what I should do about it now. My code just assumes that post is the standard behaviour for forum postings and be done with it. Double Click protection is considerably more important with the number of callbacks and workflow actions that happen on the production system.
But how can I make this useful for OpenACS? The easiest way would be to have a preview (yes/no) switch. Alternatively write my own submit button without the form builder. Or change my switch to explicitly exclude the double click protection when posting in forums (if name = post / preview).