Definitely. It should be available here:
http://github.com/BobRay in the xpdoGenerator pull request.
While you’re there, you could vote for the pull request.
If you can’t get it that way, let me know and I’ll post it.
thanks Bob, this works great!
Quote from: Bruno17 at Oct 28, 2010, 02:40 PM
thanks Bob, this works great!
Glad to hear it. I’m looking forward to seeing your CMP.
BTW, the only advantage to the mod is that it lets you specify the class name for each table and lets you process tables with the same prefix as the MODx tables (which probably shouldn’t be done in the first place).
Bob
Quote from: BobRay at Oct 28, 2010, 08:19 PM
Quote from: Bruno17 at Oct 28, 2010, 02:40 PM
thanks Bob, this works great!
Glad to hear it. I’m looking forward to seeing your CMP.
BTW, the only advantage to the mod is that it lets you specify the class name for each table and lets you process tables with the same prefix as the MODx tables (which probably shouldn’t be done in the first place).
Bob
you can see it here:
http://github.com/Bruno17/xdbedit
instructions:
http://github.com/Bruno17/xdbedit/wiki
fixed a bug with ’_’ in tablename.
It uses now
$manager= $modx->getManager();
$generator= $manager->getGenerator();
$classname = $generator->getClassName($tablename);
to get the correct classname
seems $dataobject isn’t a xpdo-object at this time.
This line is failing:
$dataobject = $modx->newObject($classname);
You should have a sanity check after it:
<?php
if (!is_object($dataobject) || !($dataobject instanceof xPDOObject)) {
die('Failed to create object of type: ' . $classname);
}
Bruno17 Please explain in more detail
your snippet formit2db creates a table?
I’m by your example creates two snippets db2formit and formit2db,
created a resource formit-snippetcall, comes with Pocket schema and classes,
but when I enter data into a form I have nothing happens (form is only updated) table "modx_regatta_ausschreibung" not in my database.
What am I doing wrong?
I strongly need a formit create documents in my data table with some fields.
ok, we do it in small steps, because I haven’t much time at the moment, sorry.
1. step:
create your table and tell us the name and perhaps the structure of your table.