form_open() Error MSG: Trying to get property of non-object |
I am using this form post with jQuery Datatables
I am getting a error on the page when it loads indicating "Message: Trying to get property of non-object" <?php echo form_open('myController/ajaxSaveProduct/' . $this->encryption->encrypt($productData->id), array('method' => 'POST', 'role' => 'form', 'accept-charset' => 'utf-8', 'enctype' => "multipart/form-data", 'id' => 'productForm')); <table id="productTable"> <thead> <tr> <th>Product</th> <th>Description</th> <th>Value</th> </tr> </thead> <tbody> <tr> <td>Tire</td><td>Large Black Tire</td><td>Desc 1435</td> </tr> </tbody> </table> <button id="saveProduct">Save</button> <select style="width:100%;" name="value[1]" data-bind="value: product_1" id="product_1" class="form-control" onchange="valueChange()"> <option value="">Choose Yes / No</option><option value="yes">Yes</option><option value="no">No</option></select></td></tr><tr id="62" data-attribute-attributeid="62" data-attribute-controltypeid="1" data-attribute-description="Desc 1428" data-attribute-title="Test MA 1428" role="row" class="even"><td>Test MA 1428</td><td>Desc 1428</td><td><input style="width:100%;" type="text" name="attributeValues[62]" data-bind="value: attribute_62" id="attribute_62" value="xxxx-0001" class="form-control" onchange="ckValueChange()"></td></tr><tr id="2" data-attribute-attributeid="2" data-attribute-controltypeid="9" data-attribute-description="Locations receive small red box" data-attribute-title="SMALL Red Box Carton" role="row" class="odd"><td>SMALL Red Box Carton</td><td>Locations receive small red box</td> <td><select name="productValue[1]" data-bind="value: product_1" id="product_1" class="form-control" onchange="changeValue()"><option value="">Choose Yes / No</option><option value="yes">Yes</option><option value="no">No</option></select></td></tr> </table>
form_open() should be form_open_multipart()
Then remove the arry field multipart/form-data SEE: CodeIgniter User's Guide - form_open_multipart 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 |