tags:

views:

43

answers:

1

Hi,

I would like to know if there is any library around I could use to generate forms and maintain them without too much pain. I'm working on an app with hundreds of form, and we have been re-inventing the wheel for all of them so far. It's not really DRY and I have to test them all.

I know that some framework can manage forms quite well, If you have any advices..

+2  A: 

You have two options:

  • Migrate to a framework. CakePHP is a decent one and ships with a nice form helper. It's also very vell integrated with ajax (prototype.js).
  • Create a simple helper class:
$form->start($post_to_this_page, $form_name, $form_id, ...);

$form->input($name, $label, ...);
matiasf