Dynamic input field saving |
Newbie yet & this is the first time i'm working with dynamic fields, please check this video first.
http://www.screencast.com/t/Tl8jWxztdfG6 As i demonstrated i have this input field in my form (view). Code: <input type="text" name="fault[0]" placeholder="" class="form-control name_list" /> what i need to know is, how can i store the values of these generating fields in database. there are other fields in this form as well i have already know & saving the results to the database using below model. Model PHP Code: public function new_jobsheet_save() { in the model at the moment i'm not saving the data of joblist as you can see, because if i do so it only save default fields value but no others. my table is "jobsheets" on this table i have field called "faults_reported_by_customer" and this is where i need the data from my dynamic input fields needs to store. how can i achive this prefer some coding level guidance as i am clueless. also is it possible to store is result in separate row of database? i really appreciate your help on this.
Your missing the value field for one.
Code: <input type="text" name="fault[0]" placeholder="" class="form-control name_list" value="" /> What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(08-09-2016, 05:25 AM)InsiteFX Wrote: Your missing the value field for one. I am sorry what do you mean friend? PHP Code: <input type="text" name="quantity" value="<?php echo set_value('quantity', '0'); ?>" size="50" /> Use the form_helper to set the value field. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |