It should be doing it automatically if you are using a MySQL field type of "text". Field types of "varchar" or "char" will get a normal input text field whereas "text" MySQL field types will be given the text field type which will automatically use markItUp!. You can additionally modify your form_fields method on your model like so: ...
public function form_fields($values = array(), $related = array()){
$fields = parent::form_fields($values, $related);
$fields['my_field']['type'] = 'text'; // or "textarea" will work too.
return $fields;
}
When you say a custom module, do you mean you created an advanced module with it's own set of controllers, views, and models, or a simple module that uses just a model? Also, is this with 0.93?
Is the form coming from a model from within the advanced module... similar to the blog_posts module (which is a simple module using the blog_posts_model.php) under the advanced blog module? Is the field type a "text" field?
Is this a page being rendered outside of the CMS (outside of the "fuel" area). If so, there is a BaseFuelController.js file that is used to initialize the javascript needed to create a markItUp! field while in the CMS and editing a module's data. However, outside of that, it will need to be initiated on it's own. If the page is in the CMS, you can try adding this to your controller's method serving up the page: $this->js_controller_params['method'] = 'add_edit';
Comments
... public function form_fields($values = array(), $related = array()){ $fields = parent::form_fields($values, $related); $fields['my_field']['type'] = 'text'; // or "textarea" will work too. return $fields; }
$this->js_controller_params['method'] = 'add_edit';