You should be able to leverage CI's built in libraries (e.g. File Upload). If you are using the forms module, then you may want to look at a hook like post_process. The hook allows you to specify a callable function that gets executed in this case before sending out the email notification. In your form, you would want to use a file upload field and then you could process it with your function using the File Upload class.
I couldn't understand how can I implement post_process as I already needed to apply some styles on fields. Should I be using a controller or an extended class?
Although right now I am using File Upload class in my controller to do this.
The post_process hook just needs to be callable. This means it could be a string value for a function, an array with the the object and method (e.g. array($my_object, 'my_post_process')) or a Closure function.
Comments
Maybe fiddle with this custom field?
It turns a text field into a selector using ckfinder as the selector popup.
I would like it to be done in cms page as I want my client to change however they like
There are a couple field types that may be able to help with your module's form:
http://docs.getfuelcms.com/general/forms#file
http://docs.getfuelcms.com/general/forms#asset
I am using CMS Forms module to create forms
You should be able to leverage CI's built in libraries (e.g. File Upload). If you are using the forms module, then you may want to look at a hook like
post_process
. The hook allows you to specify a callable function that gets executed in this case before sending out the email notification. In your form, you would want to use a file upload field and then you could process it with your function using the File Upload class.I couldn't understand how can I implement post_process as I already needed to apply some styles on fields. Should I be using a controller or an extended class?
Although right now I am using File Upload class in my controller to do this.
The
post_process
hook just needs to be callable. This means it could be a string value for a function, an array with the the object and method (e.g. array($my_object, 'my_post_process')) or a Closure function.