Hello Everyone.
Maybe someone knows how to do it.

#My Controller file:

formFields = [widgets.SingleSelectField("special_program",
options=getSpecialPrograms(),
default='E',label="Special Program:"),
widgets.SingleSelectField("first_choice",
                                    options=getChoices(),
                                    default='',label="First Choice:")]

the_form = widgets.TableForm(
    name="add",
    formFields,
    values = "",
    submit_text="Save",
    action="save",
    )

@expose(template=".templates.form")
def index(self,tg_errors=None, tg_exceptions=None):
   return dict(form=the_form,action="/save")

# My template file:

${form(action=action, method="POST")}

This works fine. I get the complete form in my template.
But what if instead i want to display only specific form fields in my
template.....something like:

${form.special_program}
or
${form.first_choice}



Thank you for your time.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to