On Wed, 2002-12-18 at 19:56, Wayne Larsen wrote:
> Okay, I hope this question is as easy to answer as the
> last one (but I fear it isn't).
>
> I've been using Cheetah and FunFormKit - the
> combination works great for a single form. I create a
> python class that defines the form, inheriting from my
> cheetah template as well as FormServlet. Then I
> create a cheetah template that inherits from this
> form, and controls the display of the form. All well
> and good so far.
>
> Now, creating a python class that defines multiple
> forms seems to be also doable (although I confess to
> not having actually done it).
>
> However, it seems there should be a simple way of
> including a form in any cheetah template, one that
> does not necessarily inherit from the form in
> question. This would be required for instance to add
> a search box to each page.
I have to admit I haven't really tried using them together yet.
Especially with 0.4, with repeating and compound fields, it becomes
harder to do layout (though 0.4 provides better layout as well).
But I have imagined them being used where the RenderableForm is in the
searchList, without any subclassing between them. Or, if you have two
forms, put a dictionary like {'form1': self.renderableForm('form1'),
'form2': self.renderableForm('form2')}
> I tried cutting and pasting the actual form code into
> a different page, and this works great, except for the
> hidden _formID_ field. I have to know in advance what
> that formID value is going to be, and it appears to me
> that these values are dynamic, so this approach falls
> down.
They aren't dynamic if you aren't using MutableForms. I wouldn't
recommend using those anyway. Otherwise they are simply the name of the
form -- each form on a page has to have a unique name.
--
Ian Bicking Colorstudy Web Development
[EMAIL PROTECTED] http://www.colorstudy.com
PGP: gpg --keyserver pgp.mit.edu --recv-keys 0x9B9E28B7
4869 N Talman Ave, Chicago, IL 60625 / (773) 275-7241
-------------------------------------------------------
This SF.NET email is sponsored by: Order your Holiday Geek Presents Now!
Green Lasers, Hip Geek T-Shirts, Remote Control Tanks, Caffeinated Soap,
MP3 Players, XBox Games, Flying Saucers, WebCams, Smart Putty.
T H I N K G E E K . C O M http://www.thinkgeek.com/sf/
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss