/views/plugins/function.isfielderror.php
PHP | 19 lines | 11 code | 8 blank | 0 comment | 1 complexity | d91e0f7344452b9c3607147cb381ec9c MD5 | raw file
Possible License(s): LGPL-3.0
- <?php
- function smarty_function_isfielderror($params, $template) {
- if (empty($template->smarty->view->loaded['form'])) {
- trigger_error("{isfielderror} command requires Form helper.", E_USER_ERROR);
- }
-
- $name = 'foo';
-
- extract(compact('template') + $params);
-
- unset($params['name']);
-
- $form = $template->smarty->view->loaded['form'];
-
-
- return $form->isfielderror($name);
- }