Re: A few more stupid questions

From: Date: Sun, 24 Oct 2004 19:30:42 +0000
Subject: Re: A few more stupid questions
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-15080@lists.php.net to get a copy of this message
On Sun, 24 Oct 2004 00:49:29 -0700, Ken Restivo <ken@restivo.org> wrote: > In my .ini file, submitText is getting ignored. I can force it by $obj->fb_submitText = > "Save" before I pass the obj to FB, but that's kind of ugly. > I can't see any reason why it wouldn't work from the ini file. In fact, I just tried it and it worked. Are you putting this in the [DB_DataObject_FormBuilder] section? > I'm trying to add a "cancel" button and I want it to appear in the same group as > the FB-generated __submit__ button. I tried $obj->fb_preDefGroups = array ('cancel' > => '__submit__'); but no luck. There has to be a simple way to do this; I'd guess > it is a common task. > Well, if cancel isn't an element in the form, this isn't going to work. Perhaps some postGenerateForm magic? function postGenerateForm(&$form) { $submit =& $form->getElement('__submit__'); $form->removeElement('__submit__'); $cancel =& $form->createElement('submit', 'cancel', ...); $form->addGroup(....); } I can't remember the rest. You could also just turn off createSubmit and create that submit button yourself (better option than what I just showed you ;-). -- paperCrane --Justin Patrin--

« previous php.pear.general (#15080) next »