Generate a CodeIgniter "Form View" from a CSV input

Just an experiment in code generation

Format of input

Every line is a form field. The "columns" from left to right are:

  1. Field Name
  2. Field Type (text, radio, checkbox, select, textarea)
  3. Field Label
  4. CodeIgniter rules
  5. Special values. This is optional and used for select fields.