Exemple #1
0
$tblEventAttendee->omitPrimaryKey();
#Create custom display fields
//$tblEventAttendee->displayAs("pkAttendeeID","User ID");
$tblEventAttendee->displayAs("fldFirstName", "First Name");
$tblEventAttendee->displayAs("fldLastName", "Last Name");
$tblEventAttendee->displayAs("fldPhone", "Phone #");
$tblEventAttendee->displayAs("fldWillBeLate", "Will You Be Late?");
$tblEventAttendee->displayAs("fldTimeArriving", "Arrival Time");
$tblEventAttendee->displayAs("fldComments", "Comments/Other");
$tblEventAttendee->displayAs("fldIPAddress", "IPAddress");
$tblEventAttendee->omitFieldCompletely("fldIPAddress");
$tblEventAttendee->omitFieldCompletely("fkEventID");
$tblEventAttendee->omitFieldCompletely("fldPhone");
$tblEventAttendee->omitFieldCompletely("fldAttending");
$tblEventAttendee->validateDeleteWithFunction("canRowBeModifiedOrDeleted");
$tblEventAttendee->validateUpdateWithFunction("canRowBeModifiedOrDeleted");
$tblEventAttendee->defineCheckbox("fldWillBeLate");
$tblEventAttendee->addOrderBy("ORDER BY fldFirstName ASC");
#Add WHERE clause so we only display information specific to the event that was selected
$tblEventAttendee->addWhereClause("WHERE fkEventID = {$eventID}");
#I could add filter boxes to the top, but have chosen not to do so; commenting these out
//$tblEventAttendee->addAjaxFilterBox("fldFirstName");
//$tblEventAttendee->addAjaxFilterBox("fldLastName");
//$tblEventAttendee->addAjaxFilterBox("fldAttending");
//using addValueOnInsert so when someone signs up it will automatically add them to this event
$tblEventAttendee->addValueOnInsert("fkEventID", $eventID);
//using addValueOnInsert to track their IP address
$tblEventAttendee->addValueOnInsert("fldIPAddress", $_SERVER["REMOTE_ADDR"]);
$tblEventAttendee->setTextboxWidth("fldTimeArriving", 8);
$tblEventAttendee->setTextboxWidth("fldLastName", 25);
$tblEventAttendee->setTextareaHeight("fldComments", 70);