CodeIgniter Forums
Why CodeIgniter put the input hidden fields in a div display:none - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Why CodeIgniter put the input hidden fields in a div display:none (/showthread.php?tid=53675)



Why CodeIgniter put the input hidden fields in a div display:none - El Forum - 08-03-2012

[eluser]pierrehs[/eluser]
Hello,
I find the hidden forms fields in a div style="display:none"

For example for the security token

Code:
<div>
&lt;input type="hidden" name="csrf_test_name" value="b850b6655768640df3e2b887yobpgh79"&gt;
</div>

I want to know the reason, because in any case, all fields of type hidden are not visible.

Thank you.


Why CodeIgniter put the input hidden fields in a div display:none - El Forum - 08-03-2012

[eluser]kanjimaster[/eluser]
I don't remember the precise details, but some older browsers would hide the hidden fields, but still allocate them some vertical height, which could mess up form layouts. Wrapping them in a div with display:none would eliminate this problem.