forked from qcubed/qcubed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsample.php
28 lines (22 loc) · 807 Bytes
/
sample.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
/**
* This is a standard, sample QForm which you can use as a starting
* point to build any QForm page that you wish.
*/
// Include prepend.inc to load Qcubed
require('includes/configuration/prepend.inc.php');
class SampleForm extends QForm {
protected $lblMessage;
protected $btnButton;
protected function Form_Create() {
$this->lblMessage = new QLabel($this);
$this->lblMessage->Text = 'Click the button to change my message.';
$this->btnButton = new QButton($this);
$this->btnButton->Text = 'Click Me';
$this->btnButton->AddAction(new QClickEvent(), new QServerAction('btnButton_Click'));
}
protected function btnButton_Click($strFormId, $strControlId, $strParameter) {
$this->lblMessage->Text = 'Hello, World!';
}
}
SampleForm::Run('SampleForm');