form validation & filling radio input values from db query |
[eluser]Unknown[/eluser]
I have looked and looked and looked (forums, user guide, googled, etc.), and am not finding the answer to my problem anywhere, so figured it was time to ask for extra sets of eyes to pretty please take a look at the code before I pull my hair out. *g* I'm trying to use the same form for both adding and editing/updating records, and the problem I'm having is getting the radio inputs to populate with their value from the database query when I load a record into the form for editing. The form works just great when adding a new record and when updating an existing record, it just does not correctly show radio values as checked when I'm initially loading the record to be edited. (Text and textarea inputs get filled in just fine, but radio and checkboxes do not get checked to match their stored values.) I've grabbed the latest libraries/Validation.php file from svn, made one bugfix change to the same file, and created an application/libraries/MY_Validation.php with the updated regexs from here and the set_defaults() function from here. Now, with all that said, I've tried out the form both with and without the updated validation bits, but neither version is working when I try to pre-fill the form with the values from the database. I've also tried out the code by providing the values directly, rather than grabbing from the database to make sure that's not the problem. Help! (Code to follow.)
[eluser]Unknown[/eluser]
The relevant bits of my code: Model: Code: class Meta_model extends Model { The controller: Code: class Meta extends Controller { And the form view (meta_form): Code: <? Thanks!
[eluser]chreestopher[/eluser]
I am having this issue also, my drop down boxes are not functioning either. |
Welcome Guest, Not a member yet? Register Sign In |