• 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)
  • 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

    (@pilotgav)

    Thanks Ross!

    Did you have to reverse engineer the plugin?

    I’ll install it and take a look 🙂

    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

    (@pilotgav)

    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.