How to specify these fields
- Single Page
Posted 04 April 2012 - 14:57 PM
1. A multi line input box
2. A wysiwyg editor as seen in some of the examples
Thanks
Posted 04 April 2012 - 15:12 PM
//EXAMPLE CALLBACK
$this->grocery_crud->callback_add_field('address',array($this,'add_field_callback_1'));
//EXAMPLE CALLBACK FUNCTION WITH MULTILINE FIELD
function add_field_callback_1()
{
return '<textarea name="address" rows="15"></textarea>';
}
//EXAMPLE CALLBACK FUNCTION WITH TINY MCE EDITOR
function add_field_callback_1()
{
return '<textarea name="address" class="texteditor"></textarea>';
}
Posted 04 April 2012 - 18:05 PM
For example:
$crud->unset_texteditor('description','full_text');
will unset the texteditor. The default text is WITH the texteditor.
If an input is a string and you want to transform it to text with texteditor you can simply do:
$crud->change_field_type('address', 'text');
You can read more about the change_field_type at: http://www.grocerycr...ange_field_type