[eluser]Energetic Pixels[/eluser]
Ok, I have the following form:
Code:
<?php echo form_open('Glossary/createTerm');
$data_textarea = array(
'name' => 'definition',
'id' => 'definition',
'cols' => '30',
'rows' => '12'
);
echo form_label('Course Number', 'crseNumber');
echo form_input('crseNumber', 'Course Number');
echo form_label('Term', 'term');
echo form_input('term', 'Term');
echo form_label('Definition', 'definition');
echo form_textarea($data_textarea);
echo form_label('Realm', 'realm');
echo form_input('realm', 'Realm');
echo form_label('Module/Lesson', 'lesson-module');
echo form_input('module-lesson', 'Module/Lesson');
echo form_submit('submit', 'Submit');
?>
<?php echo form_close(); ?>
My control function looks like:
Code:
function createTerm() {
$data = array(
'crseNumber' => $this->input->post('crseNumber'),
'term' => $this->input->post('term'),
'definition' => $this->textarea->post('definition'),
'realm' => $this->input->post('realm'),
'lesson-module' => $this->input->post('lesson-module')
);
$this->gloss_model->create_term($data);
$this->index();
}
But when I run it, I get a undefined property pointing to the 'textarea' within the createTerm function. When I change that specific line to be '$this->input->post..' it works. By using the 'input' method, is the correct way??
respectfully,
Anthony