/** * Display all data of a form without the use of other plugins. * * @param jTpl $tpl template engine * @param jFormsBase $form the form to display * @param string $builder the builder type to use * @param array $options options for the builder */ function jtpl_function_html_formdatafull($tpl, $form, $builder = 'html', $options = array()) { echo '<table class="jforms-table" border="0">'; $formfullBuilder = $form->getBuilder($builder); if (count($options)) { $formfullBuilder->setOptions($options); } foreach ($form->getRootControls() as $ctrlref => $ctrl) { if ($ctrl->type == 'submit' || $ctrl->type == 'reset' || $ctrl->type == 'hidden' || $ctrl->type == 'captcha' || $ctrl->type == 'secretconfirm') { continue; } if (!$form->isActivated($ctrlref)) { continue; } if ($ctrl->type == 'group') { echo '<tr><td scope="row"' . ($ctrl->type == 'group' ? ' colspan="2" class="jforms-group"' : '') . '>'; $formfullBuilder->outputControlValue($ctrl); echo '</td>'; echo "</tr>\n"; } else { echo '<tr><th scope="row" valign="top">'; $formfullBuilder->outputControlLabel($ctrl, '', false); echo '</th>'; echo '<td>'; $formfullBuilder->outputControlValue($ctrl); echo '</td>'; echo "</tr>\n"; } } echo '</table>'; }
/** * Display all data of a form without the use of other plugins. * * @param jTpl $tpl template engine * @param jFormsBase $form the form to display */ function jtpl_function_html_formdatafull($tpl, $form) { echo '<table class="jforms-table" border="0">'; foreach ($form->getControls() as $ctrlref => $ctrl) { if ($ctrl->type == 'submit' || $ctrl->type == 'reset' || $ctrl->type == 'hidden' || $ctrl->type == 'captcha') { continue; } if (!$form->isActivated($ctrlref)) { continue; } echo '<tr><th scope="row">'; echo htmlspecialchars($ctrl->label); echo '</th><td>'; $value = $ctrl->getDisplayValue($form->getData($ctrlref)); if (is_array($value)) { $s = ''; foreach ($value as $v) { $s .= ',' . htmlspecialchars($v); } echo substr($s, 1); } elseif ($ctrl->datatype instanceof jDatatypeHtml) { echo $value; } else { if ($ctrl->type == 'textarea') { echo nl2br(htmlspecialchars($value)); } else { echo htmlspecialchars($value); } } echo '</td></tr>'; } echo '</table>'; }
/** * Display all data of a form without the use of other plugins. * * @param jTpl $tpl template engine * @param jFormsBase $form the form to display */ function jtpl_function_html_formdatasfull($tpl, $form) { //$formBuilder = $form->getBuilder('html', $action, $params); echo '<table class="jforms-table" border="0">'; foreach ($form->getControls() as $ctrlref => $ctrl) { if ($ctrl->type == 'submit' || $ctrl->type == 'reset') { continue; } echo '<tr><th scope="row">'; echo htmlspecialchars($ctrl->label); echo '</th><td>'; $value = $ctrl->getDisplayValue($form->getData($ctrlref)); if (is_array($value)) { $s = ''; foreach ($value as $v) { $s .= ',' . htmlspecialchars($v); } echo substr($s, 1); } else { echo htmlspecialchars($value); } echo '</td></tr>'; } echo '</table>'; }
/** * @param string $action action selector where form will be submit * @param array $actionParams parameters for the action */ public function setAction($action, $actionParams) { $this->_action = $action; $this->_actionParams = $actionParams; $this->_name = jFormsBuilderBase::generateFormName($this->_form->getSelector()); if ($GLOBALS['gJCoord']->response != null && $GLOBALS['gJCoord']->response->getType() == 'html') { $this->_endt = $GLOBALS['gJCoord']->response->isXhtml() ? '/>' : '>'; } }
/** * @param string $action action selector where form will be submit * @param array $actionParams parameters for the action */ public function setAction($action, $actionParams) { $this->_action = $action; $this->_actionParams = $actionParams; $this->_name = self::generateFormName($this->_form->getSelector()); if (\jApp::coord()->response != null && \jApp::coord()->response->getType() == 'html') { $this->_endt = \jApp::coord()->response->isXhtml() ? '/>' : '>'; } }
public function __construct($sel, &$container, $reset = false) { parent::__construct($sel, $container, $reset); $ctrl = new jFormsControlinput('name'); $ctrl->label = 'Name : '; $this->addControl($ctrl); $ctrl = new jFormsControldate('date_debut'); $ctrl->label = 'Date de Debut'; $this->addControl($ctrl); $ctrl = new jFormsControldate('date_fin'); $ctrl->label = 'Date de fin'; $this->addControl($ctrl); $ctrl = new jFormsControlinput('horaires'); $ctrl->label = 'Horaires'; $this->addControl($ctrl); $ctrl = new jFormsControlinput('adresse'); $ctrl->label = 'Adresse : '; $this->addControl($ctrl); $ctrl = new jFormsControlupload('flyer'); $ctrl->label = 'Flyer'; $ctrl->maxsize = 20000000; $this->addControl($ctrl); $ctrl = new jFormsControlhtmleditor('description'); $ctrl->label = ''; $ctrl->config = 'full'; $this->addControl($ctrl); $ctrl = new jFormsControlsubmit('_submit'); $ctrl->label = 'ok'; $ctrl->datasource = new jFormsStaticDatasource(); $this->addControl($ctrl); }
public function __construct($sel, &$container, $reset = false) { parent::__construct($sel, $container, $reset); $ctrl = new jFormsControlinput('name'); $ctrl->label = jLocale::get('jPicasa~common.forms.input.name'); $this->addControl($ctrl); $ctrl = new jFormsControlsubmit('_submit'); $ctrl->label = jLocale::get('jPicasa~common.search'); $ctrl->datasource = new jFormsStaticDatasource(); $this->addControl($ctrl); }
public function __construct($sel, &$container, $reset = false) { parent::__construct($sel, $container, $reset); $ctrl = new jFormsControlinput('email'); $ctrl->label = 'Email : '; $this->addControl($ctrl); $ctrl = new jFormsControlsubmit('_submit'); $ctrl->label = 'ok'; $ctrl->datasource = new jFormsStaticDatasource(); $this->addControl($ctrl); }
/** * Display all data of a form without the use of other plugins. * * @param jTpl $tpl template engine * @param jFormsBase $form the form to display */ function jtpl_function_html_formdatafull($tpl, $form) { echo '<table class="jforms-table" border="0">'; foreach ($form->getControls() as $ctrlref => $ctrl) { if ($ctrl->type == 'submit' || $ctrl->type == 'reset' || $ctrl->type == 'hidden' || $ctrl->type == 'captcha' || $ctrl->type == 'secretconfirm') { continue; } if (!$form->isActivated($ctrlref)) { continue; } echo '<tr><th scope="row"' . ($ctrl->type == 'group' ? ' colspan="2" class="jforms-group"' : '') . '>'; echo htmlspecialchars($ctrl->label); echo '</th>'; if ($ctrl->type != 'group') { echo '<td>'; $value = $ctrl->getDisplayValue($form->getData($ctrlref)); if (is_array($value) && !empty($value)) { echo '<ul>'; foreach ($value as $v) { echo '<li>', nl2br(htmlspecialchars($v)), '</li>'; } echo '</ul>'; } else { if ($ctrl->isHtmlContent()) { echo $value; } else { if ($ctrl->type == 'textarea') { echo nl2br(htmlspecialchars($value)); } else { echo htmlspecialchars($value); } } } echo '</td>'; } echo '</tr>'; } echo '</table>'; }
public function __construct($sel, &$container, $reset = false) { parent::__construct($sel, $container, $reset); $ctrl = new jFormsControlhtmleditor('text'); $ctrl->label = ''; $ctrl->config = 'full'; $this->addControl($ctrl); $ctrl = new jFormsControlhidden('name'); $this->addControl($ctrl); $ctrl = new jFormsControlsubmit('_submit'); $ctrl->label = 'ok'; $ctrl->datasource = new jFormsStaticDatasource(); $this->addControl($ctrl); }
/** * Display all data of a form without the use of other plugins. * * @param jTpl $tpl template engine * @param jFormsBase $form the form to display */ function jtpl_function_text_formdatafull($tpl, $form) { foreach ($form->getControls() as $ctrlref => $ctrl) { if ($ctrl->type == 'submit' || $ctrl->type == 'reset' || $ctrl->type == 'hidden' || $ctrl->type == 'captcha') { continue; } if (!$form->isActivated($ctrlref)) { continue; } echo $ctrl->label, ' : '; $value = $ctrl->getDisplayValue($form->getData($ctrlref)); if (is_array($value)) { echo join(',', $value); } else { if ($ctrl->datatype instanceof jDatatypeHtml) { echo strip_tags($value); } else { echo $value; } } echo "\n\n"; } }
public function __construct($sel, &$container, $reset = false) { parent::__construct($sel, $container, $reset); $ctrl = new jFormsControlinput('name'); $ctrl->label = 'Name : '; $this->addControl($ctrl); $ctrl = new jFormsControlupload('file'); $ctrl->label = 'Fichier'; $ctrl->maxsize = 20000000; $this->addControl($ctrl); $ctrl = new jFormsControlsubmit('_submit'); $ctrl->label = 'ok'; $ctrl->datasource = new jFormsStaticDatasource(); $this->addControl($ctrl); }
public function __construct($sel, &$container, $reset = false) { parent::__construct($sel, $container, $reset); $ctrl = new jFormsControlhidden('albumId'); $this->addControl($ctrl); $ctrl = new jFormsControlinput('name'); $ctrl->label = 'Your name'; $this->addControl($ctrl); $ctrl = new jFormsControltextarea('comment'); $ctrl->label = ''; $ctrl->cols = 30; $this->addControl($ctrl); $ctrl = new jFormsControlsubmit('_submit'); $ctrl->label = 'Ok'; $ctrl->datasource = new jFormsStaticDatasource(); $this->addControl($ctrl); }
public function __construct($sel, &$container, $reset = false) { parent::__construct($sel, $container, $reset); $ctrl = new jFormsControlinput('login'); $ctrl->required = true; $ctrl->datatype->addFacet('maxLength', 50); $ctrl->label = 'Login :'******'nickname'); $ctrl->required = true; $ctrl->datatype->addFacet('maxLength', 50); $ctrl->label = 'Pseudonyme :'; $this->addControl($ctrl); $ctrl = new jFormsControlinput('pwd'); $ctrl->required = true; $ctrl->datatype->addFacet('maxLength', 50); $ctrl->label = 'Mot de passe :'; $this->addControl($ctrl); $ctrl = new jFormsControlinput('pwd2'); $ctrl->required = true; $ctrl->datatype->addFacet('maxLength', 50); $ctrl->label = 'Mot de passe (répéter):'; $this->addControl($ctrl); $ctrl = new jFormsControlinput('loc'); $ctrl->datatype->addFacet('maxLength', 255); $ctrl->label = 'Localisation :'; $this->addControl($ctrl); $ctrl = new jFormsControlinput('email'); $ctrl->required = true; $ctrl->datatype->addFacet('maxLength', 255); $ctrl->label = 'Adresse courriel :'; $this->addControl($ctrl); $ctrl = new jFormsControlsubmit('_submit'); $ctrl->label = 'S\'inscrire'; $ctrl->datasource = new jFormsStaticDatasource(); $this->addControl($ctrl); }