Question

I want to modify Campaign form thru PHP file. But I didn't see any view.edit.php, the views folder only contains view.detail.php, and view.classic.php and another two php files. Found out view.classic.php is not really the edit view php.

Where is the edit php file for Campaign module??? Thanks.

Was it helpful?

Solution

The view.XXX.php files in Modules are optional if no file is present Sugar simply uses the Core file in "include/MVC/View/views/view.edit.php"

you can create a view.edit.php in custom/modules/Campaigns/views/view.edit.php

with this content:

require_once('include/MVC/View/views/view.edit.php');

class CampaignsViewEdit extends ViewEdit {

    function CampaignsViewEdit(){
        parent::ViewEdit();
    }

    function display() {
        parent::display();
    }
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top