QuickForm: group elements and removeElement
| From: | Julie dot L dot Knoll at stls dot frb dot org | Date: | Thu, 25 Sep 2003 15:46:33 +0000 |
| Subject: | QuickForm: group elements and removeElement | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-8044@lists.php.net to get a copy of this message | ||
Is there anyway to remove only one element within a group? I know that
removeElement will not work as it looks for the element name in
_elementIndex which only contains the name of the group and not the
elements within a group.
I have the following code:
$category[] =& HTML_QuickForm::createElement('text' , 'category' ,
'Category: ' , array('size' => 25 , 'maxlength' => 254));
$category[] =& HTML_QuickForm::createElement('link' , 'browseCategory' ,
null , '#' , 'Browse' , "onclick=\"newWin =
window.open('categoryForm.php','small','width=300,height=300,toolbar=0,status=0,scrollbars=1');\"");
$category[] =& HTML_QuickForm::createElement('link' , 'addCategory' , null
, '#' , 'Add New' , "onclick=\"newWin =
window.open('../category/update.php?opener=1','small','resizable=1,toolbar=0,status=1,scrollbars=1');\"");
$form->addGroup($category , 'categoryGroup' , 'Category: ' ,
' | ' , 0);
After I validate the form, I use freeze() to show a confirmation page to
the user, but I would like to remove the two links after the text box.
Any Suggestions?