Title: Callback function
Last modified: September 1, 2016

---

# Callback function

 *  [Marie-Aude](https://wordpress.org/support/users/marie-aude/)
 * (@marie-aude)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/callback-function-6/)
 * Hello, the only thing I’m missing in your plugin is the possibility to use a 
   callback function for a specific page or field.
 * For the page, I found a solution by creating the page also with the standard 
   add_menu_page but it’s not really satisfactory…
 * [https://wordpress.org/plugins/fields-framework/](https://wordpress.org/plugins/fields-framework/)

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

 *  Plugin Author [Naif Amoodi](https://wordpress.org/support/users/naifamoodi/)
 * (@naifamoodi)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/callback-function-6/#post-7564250)
 * Hi Marie.
 * There are four actions which you can hook to. Hopefully these will take care 
   of what you are after. The actions are as follows:
 * ff_section_before
    ff_section_after
 * ff_field_before
    ff_field_after
 * The first two receive a section_uid argument and the last two receive a field_uid
   argument. So you can hook to them using something like this:
 *     ```
       function action_ff_section_before($section_uid) {
       	echo $section_uid;
   
       	exit;
       }
   
       add_action('ff_section_before', 'action_ff_section_before');
       ```
   
 *  Thread Starter [Marie-Aude](https://wordpress.org/support/users/marie-aude/)
 * (@marie-aude)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/callback-function-6/#post-7564252)
 * Thank you so much. And for the quick answer. This is perfect for creating content
   in the admin pages. And it even gives me the possibility to use datalists for
   text fields !
 * One last question 🙂 (the more you give to users, the more they want)
 * I would like to create the content of a checkbox field programatically, is there
   a hook for that also ? The data is very specific, and would be the result of 
   a query, or an array taken from the option table. It should appear as a list 
   with multiple levels. I “could” use a custom taxonomy for that, but again, it’s
   not a very nice workaround.
 *  Plugin Author [Naif Amoodi](https://wordpress.org/support/users/naifamoodi/)
 * (@naifamoodi)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/callback-function-6/#post-7564267)
 * Fields can be accessed using the FF_Registry::$fields array. So if you have a
   field named ‘my-name’ you can access it using FF_Registry::$fields[‘my-name’].
   Using the ff_field_before action, try modifying the values of FF_Registry::$fields[‘
   my-name’]->options
 * I haven’t tested this so please give it a shot and let me know if it works.
 *  Thread Starter [Marie-Aude](https://wordpress.org/support/users/marie-aude/)
 * (@marie-aude)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/callback-function-6/#post-7564275)
 * I’ll do so by the end of the week and I’ll post a feedback.
    Thank you again !!

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

The topic ‘Callback function’ is closed to new replies.

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

 * 4 replies
 * 2 participants
 * Last reply from: [Marie-Aude](https://wordpress.org/support/users/marie-aude/)
 * Last activity: [9 years, 10 months ago](https://wordpress.org/support/topic/callback-function-6/#post-7564275)
 * Status: not resolved