Pear DataObject_FormBuilder displays nothing

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I'm having problems getting the FormBuilder package to work.

I've spent the last 3hrs reading what little documentation and
examples I could find and the idea seems great, if only it'll actually
display a form.

I'm not getting any error message, and I know that my DB_DataObjects
are working as I'm able to auto generate the classes and search them.
However using the following code which I believe is meant to display a
form for the 'users' table, does absolutly nothing except displayed

I did some experimenting to see if there was something wrong with
displaying anything, and I found that nothing would print after
$builder->getForm() and I have no idea why :\

$config = parse_ini_file('example.ini', true);
foreach($config as $class => $values) {
        $options = &PEAR::getStaticProperty($class, 'options');
        $options = $values;

$building = DB_DataObject::factory('users');
if (PEAR::isError($building)) {

$builder = DB_DataObject_FormBuilder::create($building);
if (PEAR::isError($builder)) {

$form = $builder->getForm();
if (PEAR::isError($form)) {

if ($form->validate()) {
        $form->process(array(&$builder,'processForm'), false);
        echo 'New buidler ID: '.$builder->bldg_ID;

echo $form->toHtml();

This isn't even my code, it was an example from the makers of
Any help at all would be greatly appreciated!

Re: Pear DataObject_FormBuilder displays nothing

On 23 Jan 2005 04:28:48 -0800, (Sarah) wrote:

Quoted text here. Click to load it

 Are you printing that exact string anywhere? Because that's what you get in
View Source from Internet Explorer when it receives an entirely blank page;
i.e. it doesn't show you the real, empty source, it makes up a dummy partial
HTML document.

 Could it be that there is a fatal error, such as a parse error, aborting your
script before it outputs _anything_, and that you have error_reporting set too
low, and/or display_errors turned off?

< Space: disk usage analysis tool

Re: Pear DataObject_FormBuilder displays nothing

Quoted text here. Click to load it
get in
Quoted text here. Click to load it

I'm not printing that exact string, I think Firefox is doing what you
suggest IE does -> printing dummy html in replacement of a blank page.

Quoted text here. Click to load it
aborting your
error_reporting set too
Quoted text here. Click to load it

I know error detection is enabled as to get to that point I got through
some 'file doesn't exist' and 'db connection' errors. I've enabled
debugging in the config inc file but that did nothing. I don't know
enough about FormBuilder to know where it would cause this kind of
problem and there isn't enough tutorials or documentation to learn :(

Site Timeline