/** * Return all payment modules that have a sub form * such that the end user is prompted for input * * @return array $arrModuleForms * Array of CForms for each payment method that has one */ public function getAlternativePaymentMethodsThatUseSubForms() { $arrModuleForms = parent::getAlternativePaymentMethodsThatUseSubForms(); $arrRemoveIds = array(); foreach ($arrModuleForms as $id => $form) { // get the input elements of this form $objElements = $form->getElements(); // isolate the list into an array we can check $arrKeys = $objElements->getKeys(); if (count($arrKeys) == 0) { // no input fields $arrRemoveIds[] = $id; } } foreach ($arrRemoveIds as $id) { unset($arrModuleForms[$id]); } return $arrModuleForms; }