On 26/04/06, Robin Haswell <[EMAIL PROTECTED]> wrote:
> Ed Singleton wrote:
> > I want to be able to use a header in in a TableForm.  I can see how to
> > subclass Form to create a TableFormWithOptionalHeaders class that has
> > a slightly different template, but I'm not sure how to create a new
> > form widget that would just display a <h1>Section Title</h1> or maybe
> > a <hr/>.
>
> I would recommend you modify TableForm to accept a "caption" attribute,
> and stick a <caption py:if="caption" py:content="caption"/> at the top
> of the table. Then submit a patch.

Sorry, my previous email was slightly misleading.

I want to be able to use multiple headers IN a TableForm's table.  It
would produce something like the following, but with more fields in
each section (obviously).

<form>
  <table>
    <tr>
      <td colspan="2"><h1>Personal Details</h1></td>
    </tr>
    <tr>
      <td><label for="name">Name</label></td>
      <td><input TYPE="text" ID="name" NAME="name" /></td>
    </tr>
    <tr>
      <td colspan="2"><h1>Bank Details</h1></td>
    </tr>
    <tr>
      <td><label for="creditcard">Credit Card</label></td>
      <td><input TYPE="text" ID="creditcard" NAME="creditcard" /></td>
    </tr>
  </table>
</form>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to