Skip to content

Instantly share code, notes, and snippets.

@pnomolos
Created June 3, 2011 05:10
Show Gist options
  • Save pnomolos/1005907 to your computer and use it in GitHub Desktop.
Save pnomolos/1005907 to your computer and use it in GitHub Desktop.
public function add_field($code, $title, $side = 'full', $type = db_text, $just_column = false)
{
$this->custom_columns[$code] = $type;
$this->_columns_def = null;
$col = $this->define_column($code, $title)->validation();
if ( !$just_column ) {
$form_field = $this->add_form_field($code, $side)->optionsMethod('get_added_field_options');
$this->added_fields[$code] = $form_field;
return $form_field;
}
return $col;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment