Phorms

Phorms is a general purpose HTML form factory for PHP.  Its goal is to provide a simple way to create easily extensible forms.  Its usage is vaguely similar to Django’s forms library.

At the moment, documentation is a little sparse, but the API docs are complete and there are two examples showing the most common usage included in the package.

Change log

1.02
* fixed bug in Phorm where default data may sometimes be overwritten incorrectly
* fixed bug in HiddenField where parent class was instantiated incorrectly

1.01
* fixed bug in PhormField::is_valid where false values skipped field-level validation
* FileFields and ImageFields now pass either null or a File/Image instance to user-defined validators
* added file_drop.php to examples

1.0
* initial release

3 comments
  1. Luke Rotherfield
    Jun 24th, 2010 at 07:39 | #1

    Hi,
    I had an issue with the OptionsField class, I was getting an error that $this->options (line 1330 fields.php) was not an array my fix was to change $this->options to $this->choices and in the MulitipleChoiceField change the $choices to protected from private (line 1256 fields.php) not sure if this is a common issue or not but I thougt I would let you know. If this is not the place to report this feel free to delete this comment.

    Regards
    Luke

  2. Chris R.
    Nov 17th, 2010 at 02:41 | #2

    Absolutely love this library – but I’m finding it impossible to have an Image or File field and let it be “optional” It won’t accept the submission without it being present in $_FILES.

    Had to change for myself but it may be worth a minor revision of the official library.

    Thanks again.

Show Hide 1 trackbacks