I have figured out and created a module that allows me to input records into a database not created from my original Dolphin install. So that much I got done. But now I am stuck with another issue.
My client has created a set of assessments tools. Each set of tools has several pages of inputs which lead to one overall output. So, am I correct in thinking that I should create each page as a separate module and then url redirect to next page/module after form submission, or is there a way - after creating each page/module to combine them together into one module.
OK. Here is where I am at so far. I have figured out how to create multiple form pages into a module. I also know how to create a custom page. Now, how do i get my module to display custom page.
If you go to http://www.mytherapysession.net/m/complete/generalhealth you will see one of the pages that is displayed from my modules/mts/complete/MtsCompleteModule.php
On this page there are a few functions like this:
function actionGeneralHealth () {
if (!$GLOBALS['logged']['member'] && !$GLOBALS['logged']['admin']) { // check access to the page
$this->_oTemplate->displayAccessDenied ();
return;
}
$this->_oTemplate->pageStart(); // all the code below will be wrapped by the user design
bx_import ('BxTemplFormView'); // import forms class
$oForm = new BxTemplFormView ($this->generalhealthForm); // create foprms class
$oForm->initChecker(); // init form checker
if ($oForm->isSubmittedAndValid ()) { // if form is submitted and not form errors were found, save form data
$aValsAdd = array ( // add additional fields
'date' => time(),
'patient_id' => $_COOKIE['memberID'],
);
$iEntryId = $oForm->insert ($aValsAdd); // insert data to database
if ($iEntryId) { // if post was successfully date
$sRedirectUrl = BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'view/' . $iEntryId;
header ('Location:' . $sRedirectUrl); // redirect to created post view page
exit;
} else {
MsgBox(_t('_Error Occured')); // if error occured display error message
}
} else {
echo $oForm->getCode (); // display form, if the form is not submitted or data is invalid
}
$this->_oTemplate->pageCode(_t('_mts_complete_page_title_add'), true); // output is completed, display all output above data wrapped by user design
} =>end of code
Now, If you go to mytherapysession.net/example.php - you will see a basic custom page with no blocks.
What I want to do is to use a custom page to display the firm in a block so that i can add more blocks to the page.
