Title: Documentation &amp; some tips
Last modified: August 22, 2016

---

# Documentation & some tips

 *  Resolved [MrSrc](https://wordpress.org/support/users/mrsrc/)
 * (@mrsrc)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/documentation-some-tips/)
 * Hey! Thank you for your plugin, nice work.
    Here what i want to make with this
   plugin: I need to build something like ticket system ( we have few fields [username][
   title] …. [file 1] and etc. ). So, i need documentation and tips for how can 
   i make custom validation ( i mean after data passed standard form validation,
   i can check file size, … and insert data into tables i need). I visited your 
   site with hope to find some documentation ( documentation section and other ),
   but it seems to be deleted or not created yet. Help me please. P.S: Sorry for
   my English
 * [https://wordpress.org/plugins/guiform/](https://wordpress.org/plugins/guiform/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [MrSrc](https://wordpress.org/support/users/mrsrc/)
 * (@mrsrc)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/documentation-some-tips/#post-5603775)
 * In case you upgrading plugin documentation, give us old version please .
 *  Plugin Author [russellpabon](https://wordpress.org/support/users/russellpabon/)
 * (@russellpabon)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/documentation-some-tips/#post-5603892)
 * Hi,
 * In the root directory of GuiForm rename the file
 * > functions-sample.php
 *  to
 * > functions.php
 * .
    You can create your own class or modify the existing example and use WordPress
   hook
 * > add_action
 *  and
 * > dd_filter
 * .
 * This hook accept two parameter and return none. First parameter are the entry
   value and the second is the form object property.
 *     ```
       function saveEntry($data, $form){
       //Your code here!
       }
       add_action('guiform_action_{Form ID}_save_entry', 'saveEntry', 10, 2);
       add_action('guiform_action_1_save_entry', 'saveEntry', 10, 2);
       ```
   
 * The current version doesn’t have hooks for custom validation. If you want to 
   add validation for file size you need to edit the
 * > classes/GuiForm/Module/Validator.php
 * .
 * Find this code:
 *     ```
       if($value['type'] == 'f_file'){
       $validators['file'] = array('extension' => $value['validation']['extension']['type'],
       'type' => $value['validation']['extension']['mime'],
       'message'  => $value['validation']['extension']['text']);
       }
       ```
   
 * And change this to:
 *     ```
       if($value['type'] == 'f_file'){
       $validators['file'] = array('extension' => $value['validation']['extension']['type'],
       'type' => $value['validation']['extension']['mime'],
       'maxSize' => 5*1024*1024,// 5 MB
       'message' => $value['validation']['extension']['text']);
       }
       ```
   
 * Documentation and video tutorial will be release soon.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Documentation & some tips’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/guiform.svg)
 * [GuiForm](https://wordpress.org/plugins/guiform/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/guiform/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/guiform/)
 * [Active Topics](https://wordpress.org/support/plugin/guiform/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/guiform/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/guiform/reviews/)

## Tags

 * [custom function](https://wordpress.org/support/topic-tag/custom-function/)
 * [validation](https://wordpress.org/support/topic-tag/validation/)

 * 2 replies
 * 2 participants
 * Last reply from: [russellpabon](https://wordpress.org/support/users/russellpabon/)
 * Last activity: [11 years, 5 months ago](https://wordpress.org/support/topic/documentation-some-tips/#post-5603892)
 * Status: resolved