Update to form_open() in form helper to drop hidden elements passed to the function into div class="hidden" (thanks Dan)
diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php
index fae5bde..42355df 100644
--- a/system/helpers/form_helper.php
+++ b/system/helpers/form_helper.php
@@ -57,18 +57,15 @@
$form .= '>';
- if (is_array($hidden) AND count($hidden) > 0)
- {
- $form .= form_hidden($hidden);
- }
-
// CSRF
if ($CI->config->item('csrf_protection') === TRUE)
{
- $form .= sprintf('<div class="hidden">%s</div>',
- form_hidden($CI->security->csrf_token_name,
- $CI->security->csrf_hash)
- );
+ $hidden[$CI->security->csrf_token_name] = $CI->security->csrf_hash;
+ }
+
+ if (is_array($hidden) AND count($hidden) > 0)
+ {
+ $form .= sprintf("\n<div class=\"hidden\">%s</div>", form_hidden($hidden));
}
return $form;