[eluser]piranha_swe[/eluser]
Hi
My second post now, thanks for the reply in the first one.
I've been working on a form and redoing it too many times now. I'm not sure how CI wants me to deal with forms.
Here is what I want to do:
I have a form, includes fileuploads, checkboxes, selects and several input fields.
I want to be able to enter all data in the fields, press "create entry" and have it posted and I want all fields (except file) to have the posted data in the fields.
On the right hand of the form I have a list of the last 20 entries that I can click and populate the fields so I can edit my previous posts and click "update entry".
My problem is that I'm used to setting value="<?php echo $posted[3] ?>" for example.
This way I can load from DB into $posted array and populate fields or I can post and have my post array sent into the $posted array to repopulate fields.
However it seems like CI wants me to do it in a diffrent way because the value="<?php echo $posted[3] ?>" gives me notice errors when the array is empty.
I tried using the form helper class and set_select and set_value and so on. But I ran into trouble, actually it didnt do anything at all for me, but even if it had worked for my posting I guess my loading from DB wouldnt have been able to populate the fields?
So right now I just spent alot of time on this but in the end I get notice errors. Do you shut notice errors off? Or do you play by their rules?
How could I accomplish this using CI style programing?