Пример #1
0
 public static function renderForm($form)
 {
     $contentForm = $form->content;
     $inputFields = array();
     preg_match_all('/\\[\\[[input|textarea|combobox|range](.*?)\\]\\]/i', $contentForm, $inputFields);
     foreach ($inputFields[0] as $inputDefinition) {
         $content = self::processInput($inputDefinition);
         $contentForm = str_replace($inputDefinition, $content, $contentForm);
     }
     if (empty(self::$errors) && ezcInputForm::hasPostData()) {
         self::$isCollected = true;
     }
     return $contentForm;
 }
Пример #2
0
 public static function renderForm($form)
 {
     $contentForm = $form->content;
     $inputFields = array();
     preg_match_all('/\\[\\[[input|textarea|combobox|range](.*?)\\]\\]/i', $contentForm, $inputFields);
     foreach ($inputFields[0] as $inputDefinition) {
         $content = self::processInput($inputDefinition);
         $contentForm = str_replace($inputDefinition, $content, $contentForm);
     }
     if (isset($_GET['identifier']) && !empty($_GET['identifier'])) {
         $contentForm .= "<input type=\"hidden\" name=\"identifier\" value=\"" . htmlspecialchars(rawurldecode($_GET['identifier'])) . "\" />";
     } elseif (isset($_POST['identifier']) && !empty($_POST['identifier'])) {
         $contentForm .= "<input type=\"hidden\" name=\"identifier\" value=\"" . htmlspecialchars($_POST['identifier']) . "\" />";
     } elseif (isset($_SERVER['HTTP_REFERER']) && !empty($_SERVER['HTTP_REFERER'])) {
         $contentForm .= "<input type=\"hidden\" name=\"identifier\" value=\"" . htmlspecialchars($_SERVER['HTTP_REFERER']) . "\" />";
     }
     if (empty(self::$errors) && ezcInputForm::hasPostData()) {
         self::$isCollected = true;
     }
     return $contentForm;
 }
Пример #3
0
<?php

if (!isset($embed_mode)) {
    ?>
<h1><?php 
    echo htmlspecialchars($form->name);
    ?>
</h1>
<?php 
}
?>

<?php 
if (erLhcoreClassFormRenderer::isCollected()) {
    $msg = erTranslationClassLhTranslation::getInstance()->getTranslation('form/fill', 'Information collected');
    ?>
	<?php 
    include erLhcoreClassDesign::designtpl('lhkernel/alert_success.tpl.php');
    ?>
	<p><?php 
    echo $form->post_content;
    ?>
</p>	
	<a class="button secondary small radius" href="<?php 
    if (isset($action_url)) {
        echo $action_url;
    } else {
        echo erLhcoreClassDesign::baseurl('form/fill');
    }
    ?>
/<?php