46 public function render($conf = array(), $formData =
'') {
48 if (is_array($formData)) {
49 $dataArray = $formData;
51 $data = isset($conf[
'data.']) ? $this->cObj->stdWrap($conf[
'data'], $conf[
'data.']) : $conf[
'data'];
56 $data = str_replace(LF,
'||', $data);
57 $dataArray = explode(
'||', $data);
60 if (is_array($conf[
'dataArray.'])) {
63 foreach ($sortedKeyArray as $theKey) {
64 $singleKeyArray = $conf[
'dataArray.'][$theKey .
'.'];
65 if (is_array($singleKeyArray)) {
67 $label = isset($singleKeyArray[
'label.']) ? $this->cObj->stdWrap($singleKeyArray[
'label'], $singleKeyArray[
'label.']) : $singleKeyArray[
'label'];
68 list($temp[0]) = explode(
'|', $label);
69 $type = isset($singleKeyArray[
'type.']) ? $this->cObj->stdWrap($singleKeyArray[
'type'], $singleKeyArray[
'type.']) : $singleKeyArray[
'type'];
70 list($temp[1]) = explode(
'|', $type);
71 $required = isset($singleKeyArray[
'required.']) ? $this->cObj->stdWrap($singleKeyArray[
'required'], $singleKeyArray[
'required.']) : $singleKeyArray[
'required'];
73 $temp[1] =
'*' . $temp[1];
75 $singleValue = isset($singleKeyArray[
'value.']) ? $this->cObj->stdWrap($singleKeyArray[
'value'], $singleKeyArray[
'value.']) : $singleKeyArray[
'value'];
76 list($temp[2]) = explode(
'|', $singleValue);
78 if (is_array($singleKeyArray[
'valueArray.'])) {
79 $temp_accumulated = array();
80 foreach ($singleKeyArray[
'valueArray.'] as $singleKey => $singleKey_valueArray) {
81 if (is_array($singleKey_valueArray) && (
int)$singleKey .
'.' === (
string) $singleKey) {
82 $temp_valueArray = array();
83 $valueArrayLabel = isset($singleKey_valueArray[
'label.']) ? $this->cObj->stdWrap($singleKey_valueArray[
'label'], $singleKey_valueArray[
'label.']) : $singleKey_valueArray[
'label'];
84 list($temp_valueArray[0]) = explode(
'=', $valueArrayLabel);
85 $selected = isset($singleKey_valueArray[
'selected.']) ? $this->cObj->stdWrap($singleKey_valueArray[
'selected'], $singleKey_valueArray[
'selected.']) : $singleKey_valueArray[
'selected'];
87 $temp_valueArray[0] =
'*' . $temp_valueArray[0];
89 $singleKeyValue = isset($singleKey_valueArray[
'value.']) ? $this->cObj->stdWrap($singleKey_valueArray[
'value'], $singleKey_valueArray[
'value.']) : $singleKey_valueArray[
'value'];
90 list($temp_valueArray[1]) = explode(
',', $singleKeyValue);
92 $temp_accumulated[] = implode(
'=', $temp_valueArray);
94 $temp[2] = implode(
',', $temp_accumulated);
96 $specialEval = isset($singleKeyArray[
'specialEval.']) ? $this->cObj->stdWrap($singleKeyArray[
'specialEval'], $singleKeyArray[
'specialEval.']) : $singleKeyArray[
'specialEval'];
97 list($temp[3]) = explode(
'|', $specialEval);
99 $dataArray[] = implode(
'|', $temp);
104 $attachmentCounter =
'';
106 $fieldlist = array();
107 $propertyOverride = array();
108 $fieldname_hashArray = array();
112 $formName = isset($conf[
'formName.']) ? $this->cObj->stdWrap($conf[
'formName'], $conf[
'formName.']) : $conf[
'formName'];
113 $formName = $this->cObj->cleanFormName($formName);
114 $formName =
$GLOBALS[
'TSFE']->getUniqueId($formName);
116 $fieldPrefix = isset($conf[
'fieldPrefix.']) ? $this->cObj->stdWrap($conf[
'fieldPrefix'], $conf[
'fieldPrefix.']) : $conf[
'fieldPrefix'];
117 if (isset($conf[
'fieldPrefix']) || isset($conf[
'fieldPrefix.'])) {
119 $prefix = $this->cObj->cleanFormName($fieldPrefix);
126 foreach ($dataArray as $dataValue) {
129 if (is_array($formData)) {
134 $dataValue = trim($dataValue);
135 $parts = explode(
'|', $dataValue);
137 if ($dataValue && strcspn($dataValue,
'#/')) {
141 $fParts = explode(
',', $parts[1]);
142 $fParts[0] = trim($fParts[0]);
143 if ($fParts[0][0] ===
'*') {
144 $confData[
'required'] = 1;
145 $fParts[0] = substr($fParts[0], 1);
147 $typeParts = explode(
'=', $fParts[0]);
148 $confData[
'type'] = trim(strtolower(end($typeParts)));
149 if (count($typeParts) == 1) {
150 $confData[
'fieldname'] = $this->cObj->cleanFormName($parts[0]);
151 if (strtolower(preg_replace(
'/[^[:alnum:]]/',
'', $confData[
'fieldname'])) ==
'email') {
152 $confData[
'fieldname'] =
'email';
155 if (isset($fieldname_hashArray[md5($confData[
'fieldname'])])) {
156 $confData[
'fieldname'] .=
'_' . $counter;
158 $fieldname_hashArray[md5($confData[
'fieldname'])] = $confData[
'fieldname'];
160 if ($confData[
'type'] ==
'file') {
161 $confData[
'fieldname'] =
'attachment' . $attachmentCounter;
162 $attachmentCounter = (int)$attachmentCounter + 1;
165 $confData[
'fieldname'] = str_replace(
' ',
'_', trim($typeParts[0]));
167 $confData[
'fieldname'] = htmlspecialchars($confData[
'fieldname']);
169 $wrapFieldName = isset($conf[
'wrapFieldName']) ? $this->cObj->stdWrap($conf[
'wrapFieldName'], $conf[
'wrapFieldName.']) : $conf[
'wrapFieldName'];
170 if ($wrapFieldName) {
171 $confData[
'fieldname'] = $this->cObj->wrap($confData[
'fieldname'], $wrapFieldName);
174 $this->cObj->setCurrentVal($confData[
'fieldname']);
176 if (trim($confData[
'type'])) {
177 if (isset($conf[
'params.'][$confData[
'type']])) {
178 $addParams = isset($conf[
'params.'][$confData[
'type'] .
'.']) ? trim($this->cObj->stdWrap($conf[
'params.'][$confData[
'type']], $conf[
'params.'][$confData[
'type'] .
'.'])) : trim($conf[
'params.'][$confData[
'type']]);
180 $addParams = isset($conf[
'params.']) ? trim($this->cObj->stdWrap($conf[
'params'], $conf[
'params.'])) : trim($conf[
'params']);
182 if ((
string)$addParams !==
'') {
183 $addParams =
' ' . $addParams;
188 $dontMd5FieldNames = isset($conf[
'dontMd5FieldNames.']) ? $this->cObj->stdWrap($conf[
'dontMd5FieldNames'], $conf[
'dontMd5FieldNames.']) : $conf[
'dontMd5FieldNames'];
189 if ($dontMd5FieldNames) {
190 $fName = $confData[
'fieldname'];
192 $fName = md5($confData[
'fieldname']);
195 $accessibility = isset($conf[
'accessibility.']) ? $this->cObj->stdWrap($conf[
'accessibility'], $conf[
'accessibility.']) : $conf[
'accessibility'];
196 if ($accessibility || $xhtmlStrict) {
197 $elementIdAttribute =
' id="' . $prefix . $fName .
'"';
199 $elementIdAttribute =
'';
202 switch ($confData[
'type']) {
204 $cols = trim($fParts[1]) ? (int)$fParts[1] : 20;
205 $compensateFieldWidth = isset($conf[
'compensateFieldWidth.']) ? $this->cObj->stdWrap($conf[
'compensateFieldWidth'], $conf[
'compensateFieldWidth.']) : $conf[
'compensateFieldWidth'];
206 $compWidth = doubleval($compensateFieldWidth ? $compensateFieldWidth :
$GLOBALS[
'TSFE']->compensateFieldWidth);
207 $compWidth = $compWidth ? $compWidth : 1;
210 $wrap = trim($fParts[3]);
211 $noWrapAttr = isset($conf[
'noWrapAttr.']) ? $this->cObj->stdWrap($conf[
'noWrapAttr'], $conf[
'noWrapAttr.']) : $conf[
'noWrapAttr'];
212 if ($noWrapAttr || $wrap ===
'disabled') {
215 $wrap = $wrap ?
' wrap="' . $wrap .
'"' :
' wrap="virtual"';
217 $noValueInsert = isset($conf[
'noValueInsert.']) ? $this->cObj->stdWrap($conf[
'noValueInsert'], $conf[
'noValueInsert.']) : $conf[
'noValueInsert'];
218 $default = $this->cObj->getFieldDefaultValue($noValueInsert, $confData[
'fieldname'], str_replace(
'\\n', LF, trim($parts[2])));
219 $fieldCode = sprintf(
'<textarea name="%s"%s cols="%s" rows="%s"%s%s>%s</textarea>', $confData[
'fieldname'], $elementIdAttribute, $cols, $rows, $wrap, $addParams,
GeneralUtility::formatForTextarea($default));
224 $size = trim($fParts[1]) ? (int)$fParts[1] : 20;
225 $compensateFieldWidth = isset($conf[
'compensateFieldWidth.']) ? $this->cObj->stdWrap($conf[
'compensateFieldWidth'], $conf[
'compensateFieldWidth.']) : $conf[
'compensateFieldWidth'];
226 $compWidth = doubleval($compensateFieldWidth ? $compensateFieldWidth :
$GLOBALS[
'TSFE']->compensateFieldWidth);
227 $compWidth = $compWidth ? $compWidth : 1;
229 $noValueInsert = isset($conf[
'noValueInsert.']) ? $this->cObj->stdWrap($conf[
'noValueInsert'], $conf[
'noValueInsert.']) : $conf[
'noValueInsert'];
230 $default = $this->cObj->getFieldDefaultValue($noValueInsert, $confData[
'fieldname'], trim($parts[2]));
231 if ($confData[
'type'] ==
'password') {
235 $theType = $confData[
'type'] ==
'input' ?
'text' :
'password';
236 $fieldCode = sprintf(
'<input type="%s" name="%s"%s size="%s"%s value="%s"%s />', $theType, $confData[
'fieldname'], $elementIdAttribute, $size, $max, htmlspecialchars($default), $addParams);
240 $fieldCode = sprintf(
'<input type="file" name="%s"%s size="%s"%s />', $confData[
'fieldname'], $elementIdAttribute, $size, $addParams);
244 $noValueInsert = isset($conf[
'noValueInsert.']) ? $this->cObj->stdWrap($conf[
'noValueInsert'], $conf[
'noValueInsert.']) : $conf[
'noValueInsert'];
245 $default = $this->cObj->getFieldDefaultValue($noValueInsert, $confData[
'fieldname'], trim($parts[2]));
246 $checked = $default ?
' checked="checked"' :
'';
247 $fieldCode = sprintf(
'<input type="checkbox" value="%s" name="%s"%s%s%s />', 1, $confData[
'fieldname'], $elementIdAttribute, $checked, $addParams);
251 $valueParts = explode(
',', $parts[2]);
253 if (strtolower(trim($fParts[1])) ==
'auto') {
254 $fParts[1] = count($valueParts);
259 $multiple = strtolower(trim($fParts[2])) ==
'm' ?
' multiple="multiple"' :
'';
264 $pCount = count($valueParts);
265 for ($a = 0; $a < $pCount; $a++) {
266 $valueParts[$a] = trim($valueParts[$a]);
268 if ($valueParts[$a][0] ===
'*') {
270 $valueParts[$a] = substr($valueParts[$a], 1);
275 $subParts = explode(
'=', $valueParts[$a]);
277 $subParts[1] = isset($subParts[1]) ? trim($subParts[1]) : trim($subParts[0]);
279 $items[] = $subParts;
281 $defaults[] = $subParts[1];
285 $noValueInsert = isset($conf[
'noValueInsert.']) ? $this->cObj->stdWrap($conf[
'noValueInsert'], $conf[
'noValueInsert.']) : $conf[
'noValueInsert'];
286 $default = $this->cObj->getFieldDefaultValue($noValueInsert, $confData[
'fieldname'], $defaults);
287 if (!is_array($default)) {
289 $defaults[] = $default;
291 $defaults = $default;
294 $iCount = count($items);
295 for ($a = 0; $a < $iCount; $a++) {
296 $option .=
'<option value="' . htmlspecialchars($items[$a][1]) .
'"' .
297 (in_array($items[$a][1], $defaults) ?
' selected="selected"' :
'') .
'>' .
298 htmlspecialchars(trim($items[$a][0])) .
303 $confData[
'fieldname'] .=
'[]';
305 $fieldCode = sprintf(
'<select name="%s"%s size="%s"%s%s>%s</select>', $confData[
'fieldname'], $elementIdAttribute, $size, $multiple, $addParams, $option);
310 $valueParts = explode(
',', $parts[2]);
314 $pCount = count($valueParts);
315 for ($a = 0; $a < $pCount; $a++) {
316 $valueParts[$a] = trim($valueParts[$a]);
317 if ($valueParts[$a][0] ===
'*') {
319 $valueParts[$a] = substr($valueParts[$a], 1);
324 $subParts = explode(
'=', $valueParts[$a]);
326 $subParts[1] = isset($subParts[1]) ? trim($subParts[1]) : trim($subParts[0]);
328 $items[] = $subParts;
330 $default = $subParts[1];
334 $noValueInsert = isset($conf[
'noValueInsert.']) ? $this->cObj->stdWrap($conf[
'noValueInsert'], $conf[
'noValueInsert.']) : $conf[
'noValueInsert'];
335 $default = $this->cObj->getFieldDefaultValue($noValueInsert, $confData[
'fieldname'], $default);
337 $iCount = count($items);
338 for ($a = 0; $a < $iCount; $a++) {
340 $radioId = $prefix . $fName . $this->cObj->cleanFormName($items[$a][0]);
341 if ($accessibility) {
342 $radioLabelIdAttribute =
' id="' . htmlspecialchars($radioId) .
'"';
344 $radioLabelIdAttribute =
'';
346 $optionParts .=
'<input type="radio" name="' . $confData[
'fieldname'] .
'"' . $radioLabelIdAttribute .
' value="' . htmlspecialchars($items[$a][1]) .
'"' . ((string)$items[$a][1] === (
string)$default ?
' checked="checked"' :
'') . $addParams .
' />';
347 if ($accessibility) {
348 $label = isset($conf[
'radioWrap.']) ? $this->cObj->stdWrap(trim($items[$a][0]), $conf[
'radioWrap.']) : trim($items[$a][0]);
349 $optionParts .=
'<label for="' . $radioId .
'">' . $label .
'</label>';
351 $optionParts .= isset($conf[
'radioWrap.']) ? $this->cObj->stdWrap(trim($items[$a][0]), $conf[
'radioWrap.']) : htmlspecialchars(trim($items[$a][0]));
353 $option .= isset($conf[
'radioInputWrap.']) ? $this->cObj->stdWrap($optionParts, $conf[
'radioInputWrap.']) : $optionParts;
355 if ($accessibility) {
356 $accessibilityWrap = isset($conf[
'radioWrap.'][
'accessibilityWrap.']) ? $this->cObj->stdWrap($conf[
'radioWrap.'][
'accessibilityWrap'], $conf[
'radioWrap.'][
'accessibilityWrap.']) : $conf[
'radioWrap.'][
'accessibilityWrap'];
357 if ($accessibilityWrap) {
359 '###RADIO_FIELD_ID###',
360 '###RADIO_GROUP_LABEL###' 366 $accessibilityWrap = str_replace($search, $replace, $accessibilityWrap);
367 $option = $this->cObj->wrap($option, $accessibilityWrap);
370 $fieldCode = $option;
373 $value = trim($parts[2]);
378 $hiddenfields .= sprintf(
'<input type="hidden" name="auto_respond_checksum" id="%sauto_respond_checksum" value="%s" />', $prefix, $hmacChecksum);
380 if (strlen($value) &&
GeneralUtility::inList(
'recipient_copy,recipient', $confData[
'fieldname']) &&
$GLOBALS[
'TYPO3_CONF_VARS'][
'FE'][
'secureFormmail']) {
384 $value =
$GLOBALS[
'TSFE']->codeString($value);
386 $hiddenfields .= sprintf(
'<input type="hidden" name="%s"%s value="%s" />', $confData[
'fieldname'], $elementIdAttribute, htmlspecialchars($value));
390 $value = trim($parts[2]);
391 $propertyOverride[$confData[
'fieldname']] = $value;
392 $conf[$confData[
'fieldname']] = $value;
396 $value = trim($parts[2]);
397 if ($conf[
'image.']) {
398 $this->cObj->data[$this->cObj->currentValKey] = $value;
399 $image = $this->cObj->IMG_RESOURCE($conf[
'image.']);
400 $params = $conf[
'image.'][
'params'] ?
' ' . $conf[
'image.'][
'params'] :
'';
401 $params .= $this->cObj->getAltParam($conf[
'image.'], FALSE);
402 $params .= $addParams;
407 $fieldCode = sprintf(
'<input type="image" name="%s"%s src="%s"%s />', $confData[
'fieldname'], $elementIdAttribute, $image, $params);
409 $fieldCode = sprintf(
'<input type="submit" name="%s"%s value="%s"%s />', $confData[
'fieldname'], $elementIdAttribute, htmlspecialchars($value, ENT_COMPAT,
'UTF-8', FALSE), $addParams);
413 $value = trim($parts[2]);
414 $fieldCode = sprintf(
'<input type="reset" name="%s"%s value="%s"%s />', $confData[
'fieldname'], $elementIdAttribute, htmlspecialchars($value, ENT_COMPAT,
'UTF-8', FALSE), $addParams);
417 $fieldCode = nl2br(htmlspecialchars(trim($parts[2])));
420 $confData[
'type'] =
'comment';
421 $fieldCode = trim($parts[2]) .
' ';
428 $modeParameters = array();
431 switch ((
string) $modeParameters[0]) {
433 $fieldlist[] =
'_EREG';
434 $fieldlist[] = $modeParameters[1];
435 $fieldlist[] = $modeParameters[2];
436 $fieldlist[] = $confData[
'fieldname'];
437 $fieldlist[] = $confData[
'label'];
439 $confData[
'required'] = 1;
442 $fieldlist[] =
'_EMAIL';
443 $fieldlist[] = $confData[
'fieldname'];
444 $fieldlist[] = $confData[
'label'];
446 $confData[
'required'] = 1;
449 if ($confData[
'required']) {
450 $fieldlist[] = $confData[
'fieldname'];
451 $fieldlist[] = $confData[
'label'];
455 $fieldLabel = $confData[
'label'];
456 if ($accessibility && trim($fieldLabel) && !preg_match(
'/^(label|hidden|comment)$/', $confData[
'type'])) {
457 $fieldLabel =
'<label for="' . $prefix . $fName .
'">' . $fieldLabel .
'</label>';
460 if (isset($conf[
'fieldWrap.'])) {
461 $fieldCode = $this->cObj->stdWrap($fieldCode, $conf[
'fieldWrap.']);
463 $labelCode = isset($conf[
'labelWrap.']) ? $this->cObj->stdWrap($fieldLabel, $conf[
'labelWrap.']) : $fieldLabel;
464 $commentCode = isset($conf[
'commentWrap.']) ? $this->cObj->stdWrap($confData[
'label'], $conf[
'commentWrap.']) : $confData[
'label'];
466 $req = isset($conf[
'REQ.']) ? $this->cObj->stdWrap($conf[
'REQ'], $conf[
'REQ.']) : $conf[
'REQ'];
467 if ($req && $confData[
'required']) {
468 if (isset($conf[
'REQ.'][
'fieldWrap.'])) {
469 $fieldCode = $this->cObj->stdWrap($fieldCode, $conf[
'REQ.'][
'fieldWrap.']);
471 if (isset($conf[
'REQ.'][
'labelWrap.'])) {
472 $labelCode = $this->cObj->stdWrap($fieldLabel, $conf[
'REQ.'][
'labelWrap.']);
474 $reqLayout = isset($conf[
'REQ.'][
'layout.']) ? $this->cObj->stdWrap($conf[
'REQ.'][
'layout'], $conf[
'REQ.'][
'layout.']) : $conf[
'REQ.'][
'layout'];
479 if ($confData[
'type'] ==
'comment') {
480 $commentLayout = isset($conf[
'COMMENT.'][
'layout.']) ? $this->cObj->stdWrap($conf[
'COMMENT.'][
'layout'], $conf[
'COMMENT.'][
'layout.']) : $conf[
'COMMENT.'][
'layout'];
481 if ($commentLayout) {
485 if ($confData[
'type'] ==
'check') {
486 $checkLayout = isset($conf[
'CHECK.'][
'layout.']) ? $this->cObj->stdWrap($conf[
'CHECK.'][
'layout'], $conf[
'CHECK.'][
'layout.']) : $conf[
'CHECK.'][
'layout'];
491 if ($confData[
'type'] ==
'radio') {
492 $radioLayout = isset($conf[
'RADIO.'][
'layout.']) ? $this->cObj->stdWrap($conf[
'RADIO.'][
'layout'], $conf[
'RADIO.'][
'layout.']) : $conf[
'RADIO.'][
'layout'];
497 if ($confData[
'type'] ==
'label') {
498 $labelLayout = isset($conf[
'LABEL.'][
'layout.']) ? $this->cObj->stdWrap($conf[
'LABEL.'][
'layout'], $conf[
'LABEL.'][
'layout.']) : $conf[
'LABEL.'][
'layout'];
504 $content .= str_replace(
520 if (isset($conf[
'stdWrap.'])) {
521 $content = $this->cObj->stdWrap($content, $conf[
'stdWrap.']);
524 $theRedirect = isset($conf[
'redirect.']) ? $this->cObj->stdWrap($conf[
'redirect'], $conf[
'redirect.']) : $conf[
'redirect'];
526 $target = isset($conf[
'target.']) ? $this->cObj->stdWrap($conf[
'target'], $conf[
'target.']) : $conf[
'target'];
528 $noCache = isset($conf[
'no_cache.']) ? $this->cObj->stdWrap($conf[
'no_cache'], $conf[
'no_cache.']) : $conf[
'no_cache'];
533 $LD =
$GLOBALS[
'TSFE']->tmpl->linkData($page, $target, $noCache,
'index.php',
'', $this->cObj->getClosestMPvalueForPage($page[
'uid']));
536 $page =
$GLOBALS[
'TSFE']->sys_page->getPage_noCheck($theRedirect);
537 $LD =
$GLOBALS[
'TSFE']->tmpl->linkData($page, $target, $noCache,
'index.php',
'', $this->cObj->getClosestMPvalueForPage($page[
'uid']));
540 $LD =
$GLOBALS[
'TSFE']->tmpl->linkData($page, $target, $noCache,
'',
'', $this->cObj->getClosestMPvalueForPage($page[
'uid']));
541 $LD[
'totalURL'] = $theRedirect;
542 $hiddenfields .=
'<input type="hidden" name="redirect" value="' . htmlspecialchars($LD[
'totalURL']) .
'" />';
545 if ($propertyOverride[
'type']) {
546 $formtype = $propertyOverride[
'type'];
548 $formtype = isset($conf[
'type.']) ? $this->cObj->stdWrap($conf[
'type'], $conf[
'type.']) : $conf[
'type'];
552 $page =
$GLOBALS[
'TSFE']->sys_page->getPage_noCheck($formtype);
553 $LD_A =
$GLOBALS[
'TSFE']->tmpl->linkData($page, $target, $noCache,
'',
'', $this->cObj->getClosestMPvalueForPage($page[
'uid']));
554 $action = $LD_A[
'totalURL'];
555 } elseif ($formtype) {
561 $action = $LD_A[
'totalURL'];
564 $LD_A =
$GLOBALS[
'TSFE']->tmpl->linkData(
$GLOBALS[
'TSFE']->page, $target, $noCache,
'',
'', $this->cObj->getClosestMPvalueForPage($page[
'uid']));
565 $action = $LD_A[
'totalURL'];
568 $theEmail = isset($conf[
'recipient.']) ? $this->cObj->stdWrap($conf[
'recipient'], $conf[
'recipient.']) : $conf[
'recipient'];
569 if ($theEmail && !
$GLOBALS[
'TYPO3_CONF_VARS'][
'FE'][
'secureFormmail']) {
570 $theEmail =
$GLOBALS[
'TSFE']->codeString($theEmail);
571 $hiddenfields .=
'<input type="hidden" name="recipient" value="' . htmlspecialchars($theEmail) .
'" />';
574 $location = isset($conf[
'locationData.']) ? $this->cObj->stdWrap($conf[
'locationData'], $conf[
'locationData.']) : $conf[
'locationData'];
576 if ($location ==
'HTTP_POST_VARS' && isset($_POST[
'locationData'])) {
580 if (isset($this->data[
'_LOCALIZED_UID'])) {
581 $locationData =
$GLOBALS[
'TSFE']->id .
':' . str_replace($this->data[
'uid'], $this->data[
'_LOCALIZED_UID'], $this->cObj->currentRecord);
583 $locationData =
$GLOBALS[
'TSFE']->id .
':' . $this->cObj->currentRecord;
586 $hiddenfields .=
'<input type="hidden" name="locationData" value="' . htmlspecialchars($locationData) .
'" />';
589 if (is_array($conf[
'hiddenFields.'])) {
590 foreach ($conf[
'hiddenFields.'] as $hF_key => $hF_conf) {
591 if (substr($hF_key, -1) !=
'.') {
592 $hF_value = $this->cObj->cObjGetSingle($hF_conf, $conf[
'hiddenFields.'][$hF_key .
'.'],
'hiddenfields');
594 if (
$GLOBALS[
'TYPO3_CONF_VARS'][
'FE'][
'secureFormmail']) {
597 $hF_value =
$GLOBALS[
'TSFE']->codeString($hF_value);
599 $hiddenfields .=
'<input type="hidden" name="' . $hF_key .
'" value="' . htmlspecialchars($hF_value) .
'" />';
604 $hiddenfields = isset($conf[
'hiddenFields.'][
'stdWrap.']) ? $this->cObj->stdWrap($hiddenfields, $conf[
'hiddenFields.'][
'stdWrap.']) :
'<div style="display:none;">' . $hiddenfields .
'</div>';
606 $goodMess = isset($conf[
'goodMess.']) ? $this->cObj->stdWrap($conf[
'goodMess'], $conf[
'goodMess.']) : $conf[
'goodMess'];
607 $badMess = isset($conf[
'badMess.']) ? $this->cObj->stdWrap($conf[
'badMess'], $conf[
'badMess.']) : $conf[
'badMess'];
608 $emailMess = isset($conf[
'emailMess.']) ? $this->cObj->stdWrap($conf[
'emailMess'], $conf[
'emailMess.']) : $conf[
'emailMess'];
615 $theTarget = $theRedirect ? $LD[
'target'] : $LD_A[
'target'];
616 $method = isset($conf[
'method.']) ? $this->cObj->stdWrap($conf[
'method'], $conf[
'method.']) : $conf[
'method'];
618 '<form' .
' action="' . htmlspecialchars($action) .
'"' .
' id="' . $formName .
'"' . ($xhtmlStrict ?
'' :
' name="' . $formName .
'"') .
' enctype="' .
$GLOBALS[
'TYPO3_CONF_VARS'][
'SYS'][
'form_enctype'] .
'"' .
' method="' . ($method ? $method :
'post') .
'"' . ($theTarget ?
' target="' . $theTarget .
'"' :
'') . $validateForm .
'>',
619 $hiddenfields . $content,
622 $arrayReturnMode = isset($conf[
'arrayReturnMode.']) ? $this->cObj->stdWrap($conf[
'arrayReturnMode'], $conf[
'arrayReturnMode.']) : $conf[
'arrayReturnMode'];
623 if ($arrayReturnMode) {
624 $content[
'validateForm'] = $validateForm;
625 $content[
'formname'] = $formName;
628 return implode(
'', $content);
static formatForTextarea($content)
static forceIntegerInRange($theInt, $min, $max=2000000000, $defaultValue=0)
static quoteJSvalue($value)
static canBeInterpretedAsInteger($var)
static hmac($input, $additionalSecret='')
static trimExplode($delim, $string, $removeEmptyValues=FALSE, $limit=0)
static removeXSS($string)
if($list_of_literals) if(!empty($literals)) if(!empty($literals)) $result
Analyse literals to prepend the N char to them if their contents aren't numeric.
static createVersionNumberedFilename($file, $forceQueryString=FALSE)
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]
render($conf=array(), $formData='')
static inList($list, $item)
static sortedKeyList($setupArr, $acceptOnlyProperties=FALSE)