*/
/**
* [CLASS/FUNCTION INDEX of SCRIPT]
*
*
*
* 175: class SC_wizard_forms
* 203: function init()
* 242: function main()
* 257: function printContent()
* 268: function formsWizard()
*
* SECTION: Helper functions
* 311: function getConfigCode(&$row)
* 382: function getFormHTML($formCfgArray,$row)
* 662: function changeFunc()
* 721: function cfgArray2CfgString($cfgArr)
* 803: function cfgString2CfgArray($cfgStr)
* 902: function cleanT($tArr)
* 920: function formatCells($fArr)
*
* TOTAL FUNCTIONS: 11
* (This index is automatically created/updated by the extension "extdeveval")
*
*/
$BACK_PATH='';
require ('init.php');
require ('template.php');
$LANG->includeLLFile('EXT:lang/locallang_wizards.xml');
/**
* API comments:
*
* The form wizard can help you to create forms - it allows you to create almost any kind of HTML form elements and in any order and amount.
*
* The format for the resulting configuration code can be either a line-based configuration. That can look like this:
*
* Your name: | *name=input | (input your name here!)
* Your Email: | *email=input
* Your address: | address=textarea,40,10
* Your Haircolor: | hair=radio |
* upload | attachment=file
* | quoted_printable=hidden | 0
* | formtype_mail=submit | Send form
* | html_enabled=hidden
* | subject=hidden | This is the subject
*
*
* Alternatively it can be XML. The same configuration from above looks like this in XML:
*
*
*
* input
*
* 1
* name
*
*
* (input your name here!)
*
*
* input
*
* 1
* email
*
*
*
*
*
* textarea
*
* address
* 40
* 10
*
*
*
* radio
*
* hair
*
*
*
* file
*
* attachment
*
*
*
* hidden
*
* quoted_printable
* 0
*
*
* formtype_mail
* submit
* Send form
*
*
* html_enabled
* hidden
*
*
* subject
* hidden
* This is the subject
*
*
*
*
*
*
*
* The XML/phpArray structure is the internal format of the wizard.
*/
/**
* Script Class for rendering the Form Wizard
*
* @author Kasper Skaarhoj
* @package TYPO3
* @subpackage core
*/
class SC_wizard_forms {
// Internal, dynamic:
/**
* document template object
*
* @var mediumDoc
*/
var $doc;
var $content; // Content accumulation for the module.
var $include_once=array(); // List of files to include.
var $attachmentCounter = 0; // Used to numerate attachments automatically.
// Internal, static:
var $xmlStorage=0; // If set, the string version of the content is interpreted/written as XML instead of the original linebased kind. This variable still needs binding to the wizard parameters - but support is ready!
// Internal, static: GPvars
var $P; // Wizard parameters, coming from TCEforms linking to the wizard.
var $FORMCFG; // The array which is constantly submitted by the multidimensional form of this wizard.
var $special; // Indicates if the form is of a dedicated type, like "formtype_mail" (for tt_content element "Form")
/**
* Initialization the class
*
* @return void
*/
function init() {
// GPvars:
$this->P = t3lib_div::_GP('P');
$this->special = t3lib_div::_GP('special');
$this->FORMCFG = t3lib_div::_GP('FORMCFG');
// Setting options:
$this->xmlStorage = $this->P['params']['xmlOutput'];
// Document template object:
$this->doc = t3lib_div::makeInstance('template');
$this->doc->backPath = $GLOBALS['BACK_PATH'];
$this->doc->setModuleTemplate('templates/wizard_forms.html');
$this->doc->JScode=$this->doc->wrapScriptTags('
function jumpToUrl(URL,formEl) { //
window.location.href = URL;
}
');
// Setting form tag:
list($rUri) = explode('#',t3lib_div::getIndpEnv('REQUEST_URI'));
$this->doc->form ='