$integer_field = $this->input->post(‘integer_field’, TRUE) ;
if ( $integer_field == '') { $integer_field = NULL ; }
configs for validation rules are great but -- get your forms working first, then refactor when you know its working. you can do form validation in models which is my preference. i would also suggest having a separate method which builds the specific array for the insert or update. then you can have very simple insert and update methods that take any array.