Title: End user generated variable for a function
Last modified: August 31, 2016

---

# End user generated variable for a function

 *  [PilotGav](https://wordpress.org/support/users/pilotgav/)
 * (@pilotgav)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/end-user-generated-variable-for-a-function/)
 * Is there a way I can build a page for an end user to choose an item, from a list
   of items which can be saved and then referenced by a PHP function?
 * For example:
 * I need to provide Gravity Forms a form recipient email address based on the oncall
   user who’s been selected in the front end of the site.
 * So using the filter below, I’d need to write a function that get’s the current
   oncall persons info from a page that the client has chosen from a list.
 * `add_filter( 'gform_notification', 'your_function_name', 10, 3 );`
 * I’m not asking how to write the function, but rather **how do I create a list
   where the selection can be stored and retrieved by a function**?
 * I hope this makes sense. I’m new to all this 😀

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

 *  [RossMitchell](https://wordpress.org/support/users/rossmitchell/)
 * (@rossmitchell)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/end-user-generated-variable-for-a-function/#post-6914337)
 * I have done something like this using a custom page template. It would fill in
   a form and save changes to that form. The plugin which showed me the basic techniques
   was:
    `https://wordpress.org/plugins/wp-csv-to-database/` It showed me how to
   display tables, forms and controls, how to respond to form actions.
 * Once you have your list you can also access it using shortcodes, details here:
   `
   http://codex.wordpress.org/Shortcode_API`
 *  Thread Starter [PilotGav](https://wordpress.org/support/users/pilotgav/)
 * (@pilotgav)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/end-user-generated-variable-for-a-function/#post-6914378)
 * Thanks Ross!
 * Did you have to reverse engineer the plugin?
 * I’ll install it and take a look 🙂
 *  [RossMitchell](https://wordpress.org/support/users/rossmitchell/)
 * (@rossmitchell)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/end-user-generated-variable-for-a-function/#post-6914417)
 * I wouldn’t think that “reverse engineering” is appropriate under the GPL and 
   provision of source code.
    Yes, I read the plugin files, examined how the forms
   handled the display and update phases, how to use SQL and so on. In my own code
   I acknowledge this plugin as providing guidance.
 *  Thread Starter [PilotGav](https://wordpress.org/support/users/pilotgav/)
 * (@pilotgav)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/end-user-generated-variable-for-a-function/#post-6914480)
 * I wasn’t trying to be insulting. I meant reverse engineering in a good way. I’m
   new to development. Sorry if I offended.

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

The topic ‘End user generated variable for a function’ is closed to new replies.

## Tags

 * [function](https://wordpress.org/support/topic-tag/function/)
 * [list item](https://wordpress.org/support/topic-tag/list-item/)
 * [variable](https://wordpress.org/support/topic-tag/variable/)

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 4 replies
 * 2 participants
 * Last reply from: [PilotGav](https://wordpress.org/support/users/pilotgav/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/end-user-generated-variable-for-a-function/#post-6914480)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
