Aug 02 2007
∞
The Sensitive Programmer: the Drupal form API and case-sensitivity
Via trial and error I was able to deduce that
$form[‘submit_name’]=array(‘#type’=>’Submit’,’#value’=’Submit’);
is NOT the same thing as
$form[‘submit_name’]=array(‘#type’=>’submit’,’#value’=’Submit’);
not even close.
of course, this is completely sensible, seeing how (‘submit’==’Submit’) will return FALSE.
Your first instinct, as mine was, might be to wonder “Does strtolower add *that* much load?”, but what you should be wondering is “How did I get this far in my programming career without minding the case-sensitivity gap?”
I blame PHP and it’s uncased vars.
edit: I should mention that it is the latter you want when using the form api.