Not yet tested in Chronoforms yet but works for Connectivity, Useful keeping track of and reporting problems with connections.forms.
Are there any built in methods to provide this info without my crude code, Max?
A couple of the calls are to other simple functions not included in this topic (eg getThisYearV5, dateprintedV5).
Output looks like this
MembershipHistory: Form ID 22(V6CC) ©PMHU3A 2017 Printed 29-May-2017
Are there any built in methods to provide this info without my crude code, Max?
/**
* adds form information plus print date to a form or connection
*
* @param type $ccThis this from connection/form
* @param type $thePage
* @return NULL
*/
function showFormFooterV6($ccThis, $thePage = NULL) {
/** @var \stdClass Container for the form/connection information **/
$theFormInfo = new stdClass();
/** @var \StdClass The description of the form or connection **/
$theConnection = $ccThis->vars['__connection'];
/** abbreviate the full extension name **/
switch ($ccThis->extension) {
case 'chronoconnectivity':
$theFormInfo->type = 'CC';
break;
case 'chronoform':
/** @todo Not yet tested this for chronoforms **/
$theFormInfo->type = 'CF';
break;
default:
$aMessage='Bad chronoengine type';
writeLogAndSystemMessageV5($aMessage, $aMessage, 'ERROR');
break;
}
/** @var string the form or connection id from the designer **/
$theFormInfo->id = $theConnection['id'];
/** @var string the form name (alias) **/
$theFormInfo->name = $theConnection['alias'];
$theFormInfo->printString = "<div style='font-size:10px;display: inline-block !important;width:100%;'>";
/** @var string This year **/
$thisYear = getThisYearV5()->thisYear;
/** @var string the form footer to print **/
$theFormInfo->printString .= $theFormInfo->name . ": Form ID ". $theFormInfo->id. "(V6".$theFormInfo->type.")" . $thePage . " ©PMHU3A $thisYear";
$theFormInfo->printString .= "<span style='float:right;'>" . dateprintedV5() . "</span>";
$theFormInfo->printString .= "</div>";
echo $theFormInfo->printString;
return NULL;
}
A couple of the calls are to other simple functions not included in this topic (eg getThisYearV5, dateprintedV5).
Output looks like this
MembershipHistory: Form ID 22(V6CC) ©PMHU3A 2017 Printed 29-May-2017