make_edit_form

one of the documented procedures in this installation of the ACS
Usage:
make_edit_form   column   form_type   prompt   eione   eitwo   eithree   value   select
What it does:
The top-level procedure to make a form for the edit page. Goes through the form types and calls helper proc handle_edit_{form-types} for each form_type
Defined in: /web/philip/tcl/prototype-defs.tcl

Source code:


    set form_html "<tr><th valign=top align=right>$prompt</th>\n"
    switch $form_type {
        textbox {append form_html [handle_edit_textbox $column $eione $eitwo $value] "</tr>\n\n"}
        textarea {append form_html [handle_edit_textarea $column $eione $eitwo $eithree $value] "</tr>\n\n"}
        radiobutton {append form_html [handle_edit_radio $column $eione $eione $value $select] "</tr>\n\n"}
        checkbox {append form_html [handle_edit_checkbox $column $eione $eione $value $select] "</tr>\n\n"}
        select {append form_html [handle_edit_select $column $eione $eione $value] "</tr>\n\n"}
        boolean {
            if [string compare $eione "tf"] {
                append form_html [handle_edit_radio $column {t f} {Yes No} $value $select] "</tr>\n\n"
            } else {
                append form_html [handle_edit_radio $column {t f} {True False} $value $select] "</tr>\n\n"
            }   
        }
        date {
            if [empty_string_p $value] {
                append form_html "<td>No date in the database. Set a date: &nbsp; "
                append form_html "[philg_dateentrywidget_default_to_today $column]</td></tr>\n\n"
            } else {
                append form_html "<td>[philg_dateentrywidget $column $value]</td></tr>\n\n"
            }
        }
        default {
            append form_html "<input type=text size=50 name=$column><p>\n"}
    }
    return $form_html


philg@mit.edu