Adding Controls
It might be interesting for you to add new, personal controls. So, that's the way this should be done:
First copy one control element of your choice (e.g. onerow.ctrl.php, to take the simplest one) inside the directory backend/controls/ to use it as a template. Then set the 6 containing variables to fit your needs:
|
Variable |
Description |
|---|---|
|
$TITLE |
the title of the control element |
|
$CALLNAME |
the function being called in backend/classes/control.class.php to process the control file |
|
$SOURCE |
the HTML code of the control element |
|
$ENDTAG |
if an end tag is needed, write it down here (e.g. for the tag <textarea>, you need a closing tag </textarea> after the field's content) |
|
$VERGET |
PHP code ready to be passed to an eval() function in backend/classes/control.class.php. This code is used to prepare the data to be displayed in the user interface. |
|
$VERPOST |
Same as above, but executed before the data is stored into the database. |
If you need some more code to fulfil your wishes, use the backend/controls/helpers directory to store it there and include it in your control code.
When you're done, add the control element to the database by using the screen you find in Menu->System Settings->Controls. Just add a new object as you are used to it from other spunQ classes providing a name and the *.ctrl.php file name of your previously created control file.
Tags
User Interface, TechnicalRelated Subjects
>> Controls>> System Groups
>> Creating your own AJAX Form Validations
