Forum OpenACS Development: Response to ad_form documentation

Collapse
Posted by Tilmann Singer on
There's some info on ad_form_new_p in this thread:

https://openacs.org/bboard/q-and-a-fetch-msg.tcl?msg_id=0006YU

Note that within the -form declaration it's not necessary to continue lines with a backslash at the end. The list declarations can span several lines without a problem - emacs in tcl-mode indents them automatically quite nicely, like this:


    {start_date:date,to_sql(sql_date),from_sql(linear_date) 
        {label "Start"} 
        {format "YYYY/MM/DD HH12:MI AM"} 
        {minutes_interval {0 45 15}} 
        {today} 
        {help}}

And for the risk of being called a nitpicker again: I'd find it nice if the code was properly indented in the example - currently some of the widget declarations align to the left border but should be indented.

Having inline comments in the example would make it more readable too:

} -edit_data {
    # valid request to update an existing record
    db_exec_plsql note_update { }
    ad_returnredirect "."
    ad_script_abort
}