After some frustration trying to map the old form functions to the new array keys for use in the new Drupal 4.7 form API, I decided that there ought to be a way to automate this process.
So I've created Form Updater, which presents a form where you can paste Drupal PHP code with calls to old form functions (like form_textfield(), form_radios(), form_submit(), etc) - just paste your whole module in there. Submitting the form will search through the code and spit out code to create arrays for use with the new form API.
You'll still need to read the form API documentation so you can understand how to interpret and edit these arrays and properly insert them into your modules, but it solves the tedium of researching what the 4th argument of the form_weight() function does. And it provides a good launch pad for converting old code for use with the new system.
I wrote this quick, so some of the code is a little sloppy and it hasn't been thoroughly tested, so please post bug reports.
I hope everyone finds this module useful!
--= Jeff Robbins | www.jjeff.com =--
Comments
awesome
as I have written on devel list too: you rock.
--
Read my developer blog on Drupal4hu.
--
Drupal development: making the world better, one patch at a time. | A bedroom without a teddy is like a face without a smile.
You rule!
Jeff.
This is perfect, since I have not started to migrate my modules to 4.7 yet.
Indeed you rule!
--
Drupal development and customization: 2bits.com
Personal: Baheyeldin.com
--
Drupal performance tuning and optimization, hosting, development, and consulting: 2bits.com, Inc. and Twitter at: @2bits
Personal blog: Ba