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

#1
[eluser]FireStarter[/eluser]
Hello

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?

Cheers

#2
[eluser]Aken[/eluser]
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.

#3
[eluser]FireStarter[/eluser]
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

#4
[eluser]Aken[/eluser]
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  


Users browsing this thread:
1 Guest(s)


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