Welcome Guest, Not a member yet? Register   Sign In
Form Generation app (alpha) with demo
#1

[eluser]Unknown[/eluser]
Constantly keeping on checking on you database to see what fields you have to create is tedious. I have been working with codeIgniter fr the last two weeks having migrated from Symfony and it has been enjoyable. With all codeIgiter's faults it by far the best framework i have used from yii to Symfony. And this is my first app ever. One fault i am trying to solve by myself is automatic creation of forms which in Symfony is through command line. So i created a form generator.It is not entirely complete


Download here https://github.com/Madawar/formgenerator...pplication
Demo http://www.igitlimited.com/formgenerator...p/welcome/

unpack it in your localhost (note it should be contained in a folder named formgenerator)
Tested on
Firefox 6

Chrome 13.0.782.112m
Comment on how it works on your browser.
Assumptions:-
You are using apache and mysql server on localhost


Configuration.

Your path to formgenerator should be.
Code:
http://localhost/formgenerator/
Database connection

open application/controllers/welcome.php
edit the line
Code:
$this->load->library('db_models', $config = array('mysql-host', 'mysql-user', 'mysql-password'));
and put your host, user and password in the config array in that order

What if you plan not to install it on localhost but on a server
start with changing password in application/controllers/welcome.php. edit the line

Code:
$this->load->library('db_models', $config = array('localhost', 'igit', 'praise2011'));
and put your host user and password in the config array in that order e.g

Code:
$this->load->library('db_models', $config = array('mysql-host', 'mysql-user', 'mysql-password'));

make baseurl in applications/config/config.php points to the formgenerator folder
You will need to open up formgenerator/js/model.js look for the line

Code:
this.dbmodel.url='http://localhost/formgenerator/index.php/welcome/generate/'+"/"+dbname+"/"+table;

and change it to your server location e.g if your web server root is www.igitlimited.com then it will be

Code:
this.dbmodel.url='http://www.igitlimited.com/formgenerator/index.php/welcome/generate/'+"/"+dbname+"/"+table;
How to use
Choose database to work with
Select table and click choose
You can edit the form in the text area and then click update form to view changes
you can add select option code by clicking select
If you want to see the fields in your table click fields. Double click popup to close.


Changing how form looks
Just edit formarea.css to change how your forms are shown

I would also like some ideas on how to detect if a table field should be rendered as a option button select box aor checkbox e.t.c




Theme © iAndrew 2016 - Forum software by © MyBB