add field on fly to jform - Joomla! Forum - community, help and support


hy ,

sorry poor english ,

i try code :

code: select all

    public function getform($data = array(), $loaddata = true) {
        $form = $this->loadform('com_hobindex.item', 'item', array('control' => 'jform', 'load_data' => $loaddata));
        if (empty($form)) {
            return false;
        }
        $element = new simplexmlelement('<field name="onfly"
               type="list"
               label="onfly"
               description="onfly desc"
               class="inputbox"
               size="30"
               required="true"
        />');
        $form->setfield($element);

        return $form;
    }


when dump $form , see new field , dont appear on final form

thanks .

no idea ? :/





Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support