EllisLab text mark
Advanced Search
     
Why CodeIgniter put the input hidden fields in a div display:none
Posted: 03 August 2012 05:24 AM   [ Ignore ]
Avatar
Joined: 2010-09-12
10 posts

Hello,
I find the hidden forms fields in a div style=“display:none”

For example for the security token

<div>
<
input type="hidden" name="csrf_test_name" value="b850b6655768640df3e2b887yobpgh79">
</
div

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

Thank you.

 
Posted: 03 August 2012 09:46 AM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Joined: 2011-09-18
61 posts

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.