• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Hidden form elements <div>


Does anybody know what the purpose of the <div> wrapped around the hidden elements in the form helper is?

It seems unnecessary that in every form opened with form_open() my hidden CSFR input is wrapped with a <div> to double check it's hidden!

Do you think it's likely that this could be removed from a future version of CodeIgniter if I submit it as an issue?


Just an extra precaution to make sure the hidden form elements are actually hidden. Don't see why it would be a big deal. Maybe it could be removed if you had a good enough reason, or there were no objections / reasons to keep it.

Just seems fairly pointless to me unless anybody has a good reason for it?

You'll see these tools such as PageSpeed from Google complaining about the fact that you have inline styles too, asking you to move these to a stylesheet. Obviously it doesn't really decrease performance in this case but I am a bit OCD on this kind of stuff! Extra elements thrown in? Could do without them... unfortunately it's not worth replacing the form_open() function for the application as it's not a very basic function.

Anyway no big deal, it's not going to cause a problem being there. Just seems like something that could (or should?) be removed Smile

Feel free to bring it up on Github as a pull request, and you'll get some more feedback. And you can always modify the helper file to your own liking, either directly or by extending.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.