I Like The New Facebook Layout
Monday, March 16th, 2009I think I’m one of very few people who liked the new facebook layout right off the bat. And here’s why… (more…)
I think I’m one of very few people who liked the new facebook layout right off the bat. And here’s why… (more…)
I was playing around with Zend_Form a little while ago and I realized they did something neat with checkboxes.
Everytime I created a checkbox, Zend made two.
<input id="optInDefault" name="optIn" type="hidden" value="n" />
<input id="optIn" name="optIn" type="checkbox" value="y" />
One hidden, and one not. This is handy because when the user doesn’t check it – the hidden value gets posted. When the checkbox is selected, that value overrides the hidden one.
This also works for radio buttons, or any other form element where you want a default value posted.