WordPress.org

Support

Support » Plugins and Hacks » Hacks » Gravity Forms – php code to check multiple fields

Gravity Forms – php code to check multiple fields

  • Hi –

    I’m using Gravity Forms and need to change this example:

    <?php
    02
    
    03
    add_filter("gform_pre_submission_filter", "add_bcc");
    04
    function add_bcc($form){
    05
    
    06
        //creating list of emails based on fields on the form
    07
        $bcc  = $_POST["input_9"] . ","; //player 1 email
    08
        $bcc .= $_POST["input_11"] . ","; //player 2 email
    09
        $bcc .= $_POST["input_13"] . ","; //player 3 email
    10
        $bcc .= $_POST["input_15"] . ","; //player 4 email
    11
        $bcc .= $_POST["input_17"]; //player 5 email
    12
    
    13
        //setting notification BCC field to the list of fields
    14
        $form["notification"]["bcc"] = $bcc;
    15
    
    16
        //returning modified form object
    17
        return $form;
    18
    }
    19
    ?>

    into one that will check whether three radio buttons are set to YES and if so send a specific notification content, but if one of the three radio buttons is set to NO then a different notification content is used.

    Can anyone help?

Viewing 1 replies (of 1 total)
  • mohdrafie

    @mohdrafie

    Hi there,

    We don’t actually support this issue since it is a commercial plugin. You can ask the question at their support forum.

    Despite that, as a power user of Gravity Forms, this features is possible with the latest release with the conditional features.

Viewing 1 replies (of 1 total)
  • The topic ‘Gravity Forms – php code to check multiple fields’ is closed to new replies.
Skip to toolbar