[development] Giving form_alter an $op and calling it more than once.

Moshe Weitzman weitzman at tejasa.com
Tue Apr 18 12:18:54 UTC 2006

> Back to the point: What if we re-do the lifecycle of a node ins the form
> system? 
> That would mean you have form_alter($op) with:
> $op = load (collecting the form, change)
> $op = view (theming, changing the behaviour, reordering and so)
> $op = insert (data is inserted)
> $op = validate (valdation)

I think that syntax is a bit inconsistent with form api, but the idea is
right on. I'll work on a patch for 4.8 (if noone beats me to it) that gets
of the insert/update/validate ops of nodeapi. They will be replaced with
#submit and $#validate handlers.

Fapi is yet ready to handle view and load hooks but I would not be surprised
if it goes in that direction. When it does, those nodeapi ops will be
deprecated as well. The formn api is a nice callback system just like whats
needed here.

More information about the development mailing list