[drupal-devel] Rewriting use of forms in Drupal

Gerhard Killesreiter killesreiter at physik.uni-freiburg.de
Wed Jun 8 13:43:06 UTC 2005



On Fri, 3 Jun 2005, Gerhard Killesreiter wrote:

> On Fri, 3 Jun 2005, David Carrington wrote:
>
> > The biggest problem I've come across with this method is that it
> > provides incredibly little flexibility in the form layout. You're
> > almost completedly restricting yourself to a plain old linear form,
> > with no side-by-side controls or anything else.
>
> The intend of my proposal is to allow for this type of form layouts.
>
> > For example, my recipe module has a table in it. Each row of that
> > table has 3 input fields in it. I dread to think what the code looks
> > like to generate that with an array of controls.
>
> I currently have no solution for this. As my proposal is now, you'd need
> to tell your theme what to do with the individual fields. An idea is to
> have form()  (which would become theme_form()) call a "form layout"
> hook. Hmmmm.

I've discussed a bit with Adrian. I think the current solution would be
to add simple form items to a form group in _nodeapi('form pre') and
then in your theme do the table layout for that group.

The backdraw would be that all people would have to modify their themes
to use your module.

Themers to the front: Can we avoid this?

Cheers,
	Gerhard




More information about the drupal-devel mailing list