src/Easy/EasyForm.php
protected function _showForm($formName, $target, $paramFields)
    {

        $formName_org = $formName;
        if (!$this->defaultFormName)
            $this->defaultFormName = $this->objectName;
        if ($formName == null) {
            if ($this->referenceFormName == null) {
                $formName = $this->defaultFormName;
            } else {
                if ($formName = $this->referenceFormName) {
                    //this judgement is for anti endless loop between swtich forms
                    $formObj = Openbizx::getObject($this->referenceFormName);
                    if ($formObj->referenceFormName == $this->objectName) {
                        $formName = $this->defaultFormName;
                    } else {
                        $formName = $this->referenceFormName;
                    }
                }
            }
        }
        //if($this->getWebpageObject()->isInFormRefLibs($formName))
        {
            // get the form object
            /* @var $formObj EasyForm */
            $formObj = Openbizx::getObject($formName);
            $formObj->defaultFormName = $this->defaultFormName;
            if ($formName_org) {
                //RefenerenceForm records where the from switch from
                if ($this->formType != 'EDIT' &&
                        $this->formType != 'NEW' &&
                        $this->formType != 'COPY') {
                    $formObj->referenceFormName = $this->objectName;
                }
            }

            //if has more than Id field as params then $clearFixSearchRule is false, means join all where rules
            $paramTemp = $paramFields;
            unset($paramTemp['Id']);
            if (count($paramTemp)) {
                $clearFixSearchRule = false;
            } else {
                $clearFixSearchRule = true;
            }
            foreach ($paramFields as $fieldName => $val) {
                $formObj->formParams[$fieldName] = $val;
                $formObj->setFixSearchRule("[$fieldName]='$val'", $clearFixSearchRule);
                if ($fieldName == "Id") {
                    $formObj->setRecordId($val);
                }
            }

            if (!$formObj->canDisplayForm()) {
                $formObj->errorMessage = $this->getMessage("FORM_OPERATION_NOT_PERMITTED", $formObj->objectName);

                if (strtoupper($this->formType) == "LIST") {
                    Openbizx::$app->getLog()->log(LOG_ERR, "DATAOBJ", "DataObj error = " . $errorMsg);
                    Openbizx::$app->getClientProxy()->showClientAlert($formObj->errorMessage);
                } else {
                    $this->processFormObjError(array($formObj->errorMessage));
                }

                return false;
            }

            switch ($target) {
                case "Popup":
                    $formObj->setParentForm($this->objectName);
                    echo $formObj->render();
                    break;
                case "Dialog":
                    $formObj->setParentForm($this->objectName);
                    Openbizx::$app->getClientProxy()->redrawForm("DIALOG", $formObj->render());
                    break;
                default:
                    Openbizx::$app->getClientProxy()->redrawForm($this->objectName, $formObj->render());
            }
        }
    }
protected function _showForm($formName, $target, $paramFields)
    {

        $formName_org = $formName;
        if (!$this->defaultFormName)
            $this->defaultFormName = $this->objectName;
        if ($formName == null) {
            if ($this->referenceFormName == null) {
                $formName = $this->defaultFormName;
            } else {
                if ($formName = $this->referenceFormName) {
                    //this judgement is for anti endless loop between swtich forms
                    $formObj = Openbizx::getObject($this->referenceFormName);
                    if ($formObj->referenceFormName == $this->objectName) {
                        $formName = $this->defaultFormName;
                    } else {
                        $formName = $this->referenceFormName;
                    }
                }
            }
        }
        //if($this->getWebpageObject()->isInFormRefLibs($formName))
        {
            // get the form object
            /* @var $formObj EasyForm */
            $formObj = Openbizx::getObject($formName);
            $formObj->defaultFormName = $this->defaultFormName;
            if ($formName_org) {
                //RefenerenceForm records where the from switch from
                if ($this->formType != 'EDIT' &&
                        $this->formType != 'NEW' &&
                        $this->formType != 'COPY') {
                    $formObj->referenceFormName = $this->objectName;
                }
            }

            //if has more than Id field as params then $clearFixSearchRule is false, means join all where rules
            $paramTemp = $paramFields;
            unset($paramTemp['Id']);
            if (count($paramTemp)) {
                $clearFixSearchRule = false;
            } else {
                $clearFixSearchRule = true;
            }
            foreach ($paramFields as $fieldName => $val) {
                $formObj->formParams[$fieldName] = $val;
                $formObj->setFixSearchRule("[$fieldName]='$val'", $clearFixSearchRule);
                if ($fieldName == "Id") {
                    $formObj->setRecordId($val);
                }
            }

            if (!$formObj->canDisplayForm()) {
                $formObj->errorMessage = $this->getMessage("FORM_OPERATION_NOT_PERMITTED", $formObj->objectName);

                if (strtoupper($this->formType) == "LIST") {
                    Openbizx::$app->getLog()->log(LOG_ERR, "DATAOBJ", "DataObj error = " . $errorMsg);
                    Openbizx::$app->getClientProxy()->showClientAlert($formObj->errorMessage);
                } else {
                    $this->processFormObjError(array($formObj->errorMessage));
                }

                return false;
            }

            switch ($target) {
                case "Popup":
                    $formObj->setParentForm($this->objectName);
                    echo $formObj->render();
                    break;
                case "Dialog":
                    $formObj->setParentForm($this->objectName);
                    Openbizx::$app->getClientProxy()->redrawForm("DIALOG", $formObj->render());
                    break;
                default:
                    Openbizx::$app->getClientProxy()->redrawForm($this->objectName, $formObj->render());
            }
        }
    }
Show form

@param string $formName
@param string $target target type: Popup or other
@param array $paramFields
@return void