/** * Create and setup QListBox lstSignupForm * @param string $strControlId optional ControlId to use * @param QQCondition $objConditions override the default condition of QQ::All() to the query, itself * @param QQClause[] $objOptionalClauses additional optional QQClause object or array of QQClause objects for the query * @return QListBox */ public function lstSignupForm_Create($strControlId = null, QQCondition $objCondition = null, $objOptionalClauses = null) { $this->lstSignupForm = new QListBox($this->objParentObject, $strControlId); $this->lstSignupForm->Name = QApplication::Translate('Signup Form'); $this->lstSignupForm->Required = true; if (!$this->blnEditMode) { $this->lstSignupForm->AddItem(QApplication::Translate('- Select One -'), null); } // Setup and perform the Query if (is_null($objCondition)) { $objCondition = QQ::All(); } $objSignupFormCursor = SignupForm::QueryCursor($objCondition, $objOptionalClauses); // Iterate through the Cursor while ($objSignupForm = SignupForm::InstantiateCursor($objSignupFormCursor)) { $objListItem = new QListItem($objSignupForm->__toString(), $objSignupForm->Id); if ($this->objFormProduct->SignupForm && $this->objFormProduct->SignupForm->Id == $objSignupForm->Id) { $objListItem->Selected = true; } $this->lstSignupForm->AddItem($objListItem); } // Return the QListBox return $this->lstSignupForm; }