It's under the protected properties found here.
http://www.getfuelcms.com/user_guide/libraries/my_model
You can add the following to your model (assuming uid is the primary key):
class Films_model extends Base_module_model { public $required = arr…
The reference to line 444 was just so you know where that field is coming from. You should be able to place the following in your model's form_fields() method:
echo '
Does your model have an "id" column. If so, include it in your list_items method like so:
function list_items($limit = NULL, $offset = NULL, $col = '', $order = 'desc') { $this->db->select('id, uid, tid, aid, title', FALSE); $data = parent::li…
The uploaded information is saved on the model in the $this->upload_data property which is an array of all the uploaded files information obtained from $CI->upload->data()
Have you looked at the projects model in the demo branch:
https://github.com/daylightstudio/FUEL-CMS/tree/demo
It has a lot of that code to taking images and resizing them an placing them into a folder code you will probably need.
if you do a print_r($fields); it should give you all the fields. Then to remove it, you can do:
unset($fields['my_field']);
The ... OR upload comes from the fuel/modules/fuel/models/base_module_model.php form_fields method (which is what the models…
You are right in that simple modules rely on the fuel/modules/fuel/controllers/module.php controller to do all the work. However, you can create a controller whether it be an advanced module controller that exists in it's own module folder or you ca…
We've done it the opposite way, where you login to FUEL and then click on a button and it logs you into WP. The way we did that was to create an invisible form that had the users credentials already populated in it and when clicked, it would submit …
Basically, that code grabs all the blog settings and loops through them. While looping through it checks the $_POST['settings'] variable and adds it to the $save array. The settings form uses an array syntax for the field names so when it's posted, …
You should be able to use Controllers just like you can with normal CI site. We've built them before using an advanced module that contains simple modules for the products, categories, orders, etc.
Hmm... in this case it may actually be cleaner if you create controller to save just like the blog settings page. Otherwise you wind up creating more code to work around it then simply just creating a controller to handle it. The default module that…
The blog actually uses a controller because it doesn't follow the normal select from list and edit flow. Did you try changing the modules "views" => "list" parameter mentioned above?
Nice. This is good timing because the next blog post we were planning on was using the following file manager to make a better asset integrator:
https://github.com/simogeo/Filemanager
Are you familiar with it?
Are you using CKeditor or markItUp? If you are referring to removing the markItUp or CKeditor controls you can add the class of "no_editor" to the field which will make it a normal textarea box.
A model's form_fields() method returns back an associative array that can be used by Form_builder to create your forms. So in short, yes, if you are wanting to use a model's form_fields method, you will need to use it with form_builder to render the…
Assigning $fields to the value of what is returned by the $this->db calls will nullify the default values for $fields above... I'd recommend removing this:
// Select Subscribers Table & Join $fields = $this->db->select('*'); $fields = $…
Yes (and I think you mean MY_Model right)? MY_Model is a basic extension of the Model class and Base_module_model extends MY_Model for things specific to FUEL.
The blog settings module is a little different and actually uses a controller to save the information. However, I think it can be replicated by manipulating your form_fields method on your settings model to display all the appropriate setting fields…
You will first need to add a form_fields() method to your model to manipulate the fields for your form like so:
... function form_fields($values = array(), $related = array()) { // get the default fields first $fields = parent::form_fields…
First, as far as the error, the recent_project table is missing an ID field which is why you are seeing that error.
With regards to the multiple images, try adding the class "multifile" to the $fields['image_upload'] field which should allow you t…