Welcome Guest, Not a member yet? Register   Sign In
Automated Form Generation
#1

[eluser]Phil Sturgeon[/eluser]
Call me lazy but there is nothing more boring than making 100's of CRUD forms for your new admin control panel. There are a few solutions:

Scaffolding: Sadly short term solution and has its obvious flaws like cannot access NULL values and needs a separate controller for each damn table.

CodeCrafter: Is a very intelligent piece of coding, sites that code themselves are not only a dream but in some ways a nightmare... this is my job you are stealing here!! However the code is a little OTT, makes too many folders and is not the best solution.

Rapyd: Any idea how the hell to make this work? Takes me a long time of faffing just to get a simple form done, and again, includes HUNDREDS of files!

Is there any solution to simply create a really simple form from a database? Like, one single controller with a parameter accepting a table name which passes to a library to return a dynamically generated view?

There is no need for all this "Comes with 6 million Javascript libraries and requires a new folder in every single CI folder" its OTT and messy. I do hope there is another CRUD solution as coding one myself would take even longer than making the forms :p
#2

[eluser]Crimp[/eluser]
I'll make the button. ;-)
#3

[eluser]Shadowhand[/eluser]
Don't forget Forge!
#4

[eluser]Crafter[/eluser]
Look again at CodeCrafter, warts and all.

You don't have to create code for your entire database. You can choose a single table, then choose whether you want to generate the view, controller, model or any combination of the above,

Why you can even choose to display the code on the screen for easy cut and paste instead of creating the resultant files on disk.

If you don't like my coding style you can create your own templates for the generated code.
#5

[eluser]danoph[/eluser]
i tried to use forge, put the files in my CI project, and, errors...i'm sure it's great but annoying when installing something and it doesn't work.


Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /Users/me/Sites/egci/system/application/libraries/Forge.php on line 32
#6

[eluser]Phil Sturgeon[/eluser]
[quote author="Shadowhand" date="1182471197"]Don't forget Forge![/quote]

That's not very "DB -> Form"ish but it does seem quite useful.
#7

[eluser]Shadowhand[/eluser]
[quote author="danoph" date="1182486236"]i tried to use forge, put the files in my CI project, and, errors...i'm sure it's great but annoying when installing something and it doesn't work.


Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /Users/me/Sites/egci/system/application/libraries/Forge.php on line 32[/quote]

Forge is PHP5 only.
#8

[eluser]Unknown[/eluser]
I think I've found something you could try and implement...
http://www.phpguru.org/static/TableEditor.html

It's a class, not an application so you can easily shape it to your means.

PS: Sorry about the late posting, I only just signed up Wink
#9

[eluser]Phil Sturgeon[/eluser]
[quote author="rotw" date="1182632166"]PS: Sorry about the late posting, I only just signed up Wink[/quote]

Its just not good enough, where were you when I needed you most! Sad

However I might have to let you off! That is quite some funky shniz right there, thanks for the link!
#10

[eluser]sikkle[/eluser]
I think i'm looking for the same thing, not a full implemented solution but something like

mysql field are ->

Code:
name : description
attribute : varchar
varchar lenght :(100)

create a view file only with the name of the table :

let use 40 for size by default everywhere maybe an option to control if value is needed or not.

Code:
<?=form_input(array('name'=>'description', 'id'=>'description', 'maxlength'=>'100', 'size'=>'40',
                'value'=>(isset($this->validation) ? $this->validation->description  : '')))?>


Is it for what you've looking for ? and have you ever see this around ?




Theme © iAndrew 2016 - Forum software by © MyBB