I tried extending a module with little luck so far. The mact is outputting unset when I use create form
Code: Select all
class addScheduleForm extends CMSModule {
var $eventName = "";
var $eventDate = "";
var $eventInfo = "";
function setName($value){
$this->eventName=$value;
}
function setDate($value){
$this->eventDate=$value;
}
function setInfo($value){
$this->eventInfo=$value;
}
function createForm($id, $returnid) {
parent::CMSModule();
echo "<h3>Add a Schedule Event</h3>";
echo $this->CreateFormStart($id, "addevent", '$returnid');
echo "Event Name";
echo "<br/>";
echo $this->CreateInputText($id, "eventName", $this->eventName, 30, 40, "");
echo "<br/>";
echo "<br/>";
echo "Event Date";
echo "<br/>";
echo $this->CreateInputText($id, "eventDate", $this->eventDate, 30, 40, "");
echo "<br/>";
echo "<br/>";
echo "Class Information";
echo "<br/>";
echo $this->CreateTextArea($this->GetPreference('allow_summary_wysiwyg', 1), $id, $this->eventInfo, 'eventInfo', '', '', '', '', '80', '3');
echo "<br/>";
echo "<br/>";
echo $this->CreateInputSubmit($id, "submit", "Add Event");
echo $this->CreateInputSubmit($id, "cancel", "Cancel");
echo $this->CreateFormEnd();
}
}
Code: Select all
<input type="hidden" name="mact" value="unset,m1_,addevent,0" />
<input type="hidden" name="m1_returnid" value="$returnid" />