Fork me on GitHub

Overriding pnForm class - How?  Bottom

  • I am really digging into the pnForm classes and making good progress with it. I have just discovered pnformcheckboxlist and it has the potential to save me a ton of time. However, I would like to add a little bit to the way it is rendering the checkbox list. This seems like it should be easy, since the pnform plug ins are classes. Just override pnformcheckboxlist and the render function and you should be set. Classic oop design. Problem is, I am not sure how to get this to hook up. I don't need help with the class stuff, I have my head around that. What I want to know is where to put the file so that Smarty can see it. I created the code for the file....

    Code

    <?php


    Loader::requireOnce('system/pnForm/plugins/function.pnformcheckboxlist.php');
    /**
     * Description of functionquickcheckboxlist
     *
     * @author paustian
     */

    class quickCheckBoxlist extends pnFormCheckboxList {
        function render(&$render){
            $ret_text = parent::render($render);
            $ret_text = "<p>a test of this</p>" . $ret_text;
            return $ret_text;
        }
    }
    ?>


    First off. I had to place this in the pnForm plugins directory to get Zikula to see this. Is there some other way to do this? Second, nothing is being rendered. At least nothing appears on the page where the plugin is supposed to add its stuff. Can anyone guide me on this stuff. Thanks.



    edited by: Paustian, datetimebrief

This list is based on users active over the last 60 minutes.