clayallsopp/formotion — pull request #2 by mordaroso (2012-06-28 09:34:08+00:00)
Title: Refactoring & Multiline Text Type

Hi there

I wanted to use and extend formotion for a project. Therefore I checked the code and did some structural refactoring.

The main idea behind the refactoring was that creating and extending row types would get easier. I went a similar approach to what [Formtastic](https://github.com/justinfrench/formtastic) does.

First I [refactored following parts](https://github.com/mordaroso/formotion/commit/4495c2c59a41d9b93efe30141eb7bddb0c92a707):
* I moved all the row type specific parts into own classes (easy readable, extendable)
* Use dynamic loading of available row types (convention over configuration)

And then I was able to [create a new row type for multiline text](https://github.com/mordaroso/formotion/commit/3e2631d3b0d1c91f8b80e0fe8b05dfa601d957b8):
* Added a rowHeight parameter to the Row
* created a new row type for multiline text as an UITextView (see screenshot)

![Text Field Example](https://dl.dropbox.com/u/1098463/Screenshots/Screen%20Shot%202012-06-28%20at%2011.10.15%20.png)
_Text Field Example (Bio)_

Tests are green. Documentation missing on some parts.
Before I dig deeper in to work I would like to show you the code and get your opinion on it.