Phorm->open() attributes support added #6

wants to merge 49 commits into


None yet

7 participants


Phorm->open() did not make use of its attributes argument, this can now be used to add to the attributes applied and overwrite existing, should be backwards compatible.

Thomas and others added some commits Nov 17, 2009
Thomas Add support for non-tabbed forms (temporary in a new herited class). 9b03d82
Thomas New example file to demonstrate PhormsExt. fffda62
Thomas Add integration with "Really Easy Field Validation" (based on prototy…
…pejs) for real-time and client-side validation (example updated).
Thomas Correct support for fieldsets and add an example. (+ minor doc fixes) d33b317
Thomas Add client-side validation in the fieldsets' example. f8337b3
Thomas Add new field types : AlphaField, AlphaNumField. 8269267
Thomas Add missing translations. b1fec8b
Thomas Fix a typo. ed2b8cb
@sodabrew sodabrew prepare_values method that handles an array value for multiple input …
@sodabrew sodabrew When validating an array input field, don't throw an error if the val…
…ue is not

an array; it may simply have received no input.
@sodabrew sodabrew Corrected variable to $this->choices, not $this->options. 6f72183
@sodabrew sodabrew The choices field needs to be public in order to be inherited properl…
…y the OptionsField subclass.
@sodabrew sodabrew Final newlines. 8ff7072
@sodabrew sodabrew Add newlines to the output and optional attributes to opening tags. eba0ef1
@sodabrew sodabrew Rearrange and label CheckboxWidget. 908666f
@sodabrew sodabrew Add OptionField for an array of RadioWidgets, just like OptionsField …
…is for CheckboxWidgets. But it'd probably be better to have a single OptionsField and choose between radio and checkbox widgets at instantiation.
Thomas Few fixes, improved HTML markup. a1e9313
Thomas - Update scriptaculous and prototype
- Little API changes (use PhormValidation::Required instead of a callback function for required fields)
- Little speed inprovements
- Better integration of live (javascript) validation.
- Add support for translations
- W3C validation passed
- Better html indentation
- Add Phorm::display() to display a complete form
- Merge of Phorm and PhormExt, please use Phorm (class name) now
- Bug fixes
@sodabrew sodabrew Line wrapping for better readability. 25c7518
@sodabrew sodabrew The MultipleChoiceField class will now use the MultiSelectWidget by d…
…efault, or optionally an OptionGroupWidget with RadioWidgets or CheckboxWidgets if specified.
@sodabrew sodabrew Allow arguments to field validation functions. 4c5a735
@sodabrew sodabrew add_error method in Field class. bc49cff
@sodabrew sodabrew form tag actions should be lowercase. Also rearrange switch to remove…
… duplicate code.
@sodabrew sodabrew Spacing to match 4-space tabs. 7830f0d
@sodabrew sodabrew Rearrange the is_valid method, add a post-validate hook, remove the c…
…lean_data method, add get_raw_value (for post-validate to get access to values that haven't made available yet -- yuck!), and move error gathering and value gathering directly into their respective functions.
Thomas Bump to v2 and commit all the changes ! eba6536
@petsagouris petsagouris added bistory's changes and resolved the conflicts e6c5e12
@petsagouris petsagouris coding style cleanup, removed 016f503
@petsagouris petsagouris Currently broken, fixing a lot.
Removed Javascript files, its gonna happen later when an Ajax way is introduced in parallel with the proper server-side way.
Removed docs (regenerate later when everything is smooth).
Removed extra examples and classes.
Splitted classes to files.
Unified loading of classes.
Started implementing filter_var wherever possible.
Fixed a lot of PHPDoc comments.

Signed-off-by: Petsagourakis George <>
@petsagouris petsagouris Still broken, Just fixing trailing whitespace and removing PHP close …
@petsagouris petsagouris Made the examples work as expected. Cleaned up the HTML too. 9adfe37
@petsagouris petsagouris All done and working. Fixing a previous bad commit. 8a2c913
@jordanlev jordanlev Added petsagouris's comments about what changes he made to the README…
… file.
@jordanlev jordanlev Improved class usability (IMHO) -- changed "Numeric" field name to "I…
…nteger", added $size param to Decimal and Integer fields, simplified built-in 'required' validation, changed default form method from GET to POST, added display_errors() function to output ALL error messages, and added a public fields() function to expose all form field objects for looping. Added a new example file, and cleaned up some code and comments.
@jordanlev jordanlev text/integer fields now set html maxlength based on param; refactored…
… built-in _required_ validation code
@jordanlev jordanlev updated README to reflect new changes 3c2f3d6
@jordanlev jordanlev HiddenField passing wrong params to parent TextField (thanks Tris) 19dd756
@lemats lemats add validate_required_field to check if checkbox is checked in case o…
…f "required" validator.
@lemats lemats add further checks in file_was_uploaded e2510a5
@jordanlev jordanlev Merge pull request #1 from lemats/patch-1
add validate_required_field: checks if checkbox is checked in case of "required" validator.
@jordanlev jordanlev Merge pull request #2 from lemats/master
add further checks in file_was_uploaded
@tf198 tf198 Fixed bug where you cant uncheck a checkbox 3a8a35b
@jordanlev jordanlev Merge pull request #5 from tf198/master
Checkbox Bug
@gardiner gardiner Adjusted function signature to avoid warnings
- added missing parameters to Hidden#label() and Hidden#help_text() to match superclass signatures
@gardiner gardiner Removed duplicate value escaping
- value was html-escaped twice in this function, resulting in broken forms
@gardiner gardiner Fixed integer field validation for value "0"
- added explicit check for 0 to circumvent cast to false
@jordanlev jordanlev Merge pull request #6 from gardiner/bugfixes
Small bugfixes
@jordanlev jordanlev refactored integer validation fix, added some comments to prior bugfixes 9ad283b
@stevelacey stevelacey Custom attributes for form open tags. 1477d61
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment