Adding a new dashboard page via a package in 5.7.1

Hi everyone,

I'm new to Concrete5 and relatively new to php also.

I'm trying to create a package containing a form (in a block) and a dashboard page to display the results of that form.

The form allows users to submit feedback on my website, so that I can view that feedback in the dashboard.

The form results are added to a table in the database, where I want the dashboard page to retrieve the data from and display it.

I've been trying for several days to figure out how to add my new single page to the dashboard, to no success.

At the moment when I try to install my package, it throws up that it cannot find the Loader class.

I wondered if somebody could take a look at what I'm doing wrong (or what I've neglected to do completely) and explain like I'm 5 what exactly I've got to do to achieve my goal.

Package Controller:
namespace Concrete\Package\FeedbackFormPackage;
use \Concrete\Core\Attribute\Type;
use \Concrete\Core\Package\Package;
use \Concrete\Core\Block\BlockType\BlockType;
use \Concrete\Core\Src\Legacy\Loader;
defined('C5_EXECUTE') or die(_('Access Denied.'));
class Controller extends Package
   protected $pkgHandle = 'feedback_form_package';
   protected $appVersionRequired = '5.7.1';
   protected $pkgVersion = '0.4';
   public function getPackageDescription()
      return t("This package allows users to give feedback to the administrator of a website.");

Dashboard page controller:
defined('C5_EXECUTE') or die("Access Denied.");
class DashboardReportsFeedbackController extends Controller {
    public $package_name = 'feedback_form_package';

Single page view:
defined('C5_EXECUTE') or die(_("Access Denied."))

I really hope somebody can help me out; I'm at a real loss here.


View Replies:
mhawke replied on at Permalink Reply
The simple solution would be to use the standard core 'Form' block which already presents the results in the dashboard. Does your feedback form contain special functionality that the core Form block can't handle?
mhawke replied on at Permalink Reply 1 Attachment
You can also install the attached free add-on and have a look at how it installs dashboard pages.