⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

add_fields



clustersblue
  • profile picture
  • Member

Posted 16 January 2013 - 07:31 AM

Hi,

I have this table relationship:


$crud->set_table('session')
->set_subject('Session')
->set_relation('product_group_id','product_groups','product_group_name',array('disabled_id'=>'0'))
->set_relation('product_id','products','product_name',array('disabled_id'=>'0'))
->set_relation('solution_id','solutions','solution_name',array('disabled_id'=>'0'))
->set_relation('host_id','hosts','host_name',array('disabled_id'=>'0'))
->set_relation('mobile_id','mobile','mobile_name',array('disabled_id'=>'0'))
->set_relation('server_id','servers','server_name',array('disabled_id'=>'0'))
->set_relation('testing_type_id','testing_types','testing_type_name',array('disabled_id'=>'0'))
->set_relation('connectivity_id','connectivity','connectivity_name',array('disabled_id'=>'0'))
->set_relation('charter_id','charter','charter_code',array('disabled_id'=>'0'))
->set_relation('charter_id_rc_date','charter','requested_completion_date')
->set_relation('operator_id','operators','short_name',array('disabled_id'=>'0'))
->set_relation('model_id','model','model_name',array('disabled_id'=>'0'))
->set_relation('status_id','status','status_name')
->set_relation('location_id','locations','location_name')
->set_relation_n_n('task_id', 'session_tasks', 'tasks', 'session_id', 'task_id', 'task_name','priority', array('disabled_id'=>'0'))
->order_by('session.session_id','desc');
$crud->where('session.disabled_id',0);


And I have this add_field function:


$crud->add_fields('charter_id');
,'location_id'
,'operator_id'
,'status_id'
,'testing_type_id'
,'charter'
,'request_Priority'
,'charter_id_rc_date'
,'product_id'
,'host_id'
,'mobile_id'
,'server_id'
,'connectivity_id'
,'solution_id'
,'specific_Notes'
,'configuration_Requirement'
,'comment_box');


When I submit the form it has this response:


<textarea>{"success":false,"error_message":"","error_fields":[]}</textarea>


But when I will not use the add_fields() function (that is, displays all the fields) the submit form works fine. It seems to me that there is some consideration when using add_fields() function. I'm looking at my database and code but couldn't determine the cause. I really appreaciate if someone points me to where to start.

I already have some javascript workaround for this but thinking of posting this here hoping for some inputs and/or clarification about the add_field() function.

Thanks and BR,
Clustersblue

clustersblue
  • profile picture
  • Member

Posted 16 January 2013 - 14:47 PM

Ok. I was able to check that one of my table column causes the issue.