CodeIgniter’s Form Helper doesn’t respect POST arrays
I’ve been working on my first ‘proper’ CodeIgniter project this week. It’s been quite gruelling, as there are some moments where I have definitely sped up my production. But it’s constantly getting hampered by the learning curve. It may be slight, but is frustrating when I hit a wall.
One issue that just cam up is that I want to send multi-dimensional post data to the set_value function in the Form Helper. As you’re passing a string, the array is completely disregarded, and you’re left with nothing.
I’ve created an extension to the helper to temporarily get around the problem until I can look at it and fix it properly:
MY_form_helper.php
set_value($field, $default));
}
}
?>
This sets a second parameter as the array index. This way, you should be able to access form elements sent into the POST array as arrays themselves.
Related posts:
- Now We Can Make Our Own Gigs I’ve just been reading John Young’s post on his forum...
- SCP and filename spaces Copying files with scp is difficult enough without spaces. So...
- Block Facebook Adverts in Firefox Anyone using Facebook will know that it’s quite annoying losing...
Related posts brought to you by Yet Another Related Posts Plugin.
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.