Update 11 January 2008: SMERF web site completed.
Update 9 January 2008: SMERF Released!
Update 8 January 2008: I’ve completed the documentation and testing. I’ve created a project on RubyForge which is waiting approval. If this is not ready by tomorrow I will make an alternate link available for download, so if all goes well I should have a download available tomorrow.
I am putting the final touches to a new plugin called SMERF which stands for Simple MEta Rails Form. The plugin is a result of me extracting the code I used for one of my projects which I discussed in an earlier article Ruby on Rails Survey Builder.
I’ve spend the past few weeks rewriting parts of it to make it more generic so that it can be used for all sorts of things including survey’s, questionnaires, data collection forms and so on. Some of the important changes I’ve made include
- Allow question validations to be written using Ruby code. You can now create your own validation methods as required, there are also a couple of standard system validation methods that come with the plugin. You can specify any number of validation methods for a question by comma separating each method name, e.g. validation: validate_mandatory_question, validate_date_format
- User responses are now stored in a DB table allowing you to perform analysis on the question responses using SQL.
- Currently there are no tests
- Allow forms to be broken into smaller forms, currently you get all questions on a single form
- Allow the save of user responses as you move from form to form
I’m currently writing a plugin generator that will make installation of the plugin easier, hopefully I’ll have this done very soon. I then need to finish the documentation which is mostly done.
I will keep you informed and let you know when the plugin will be available.