WordPress.org

Ready to get started?Download WordPress

Forums

Gravity Forms - php code to check multiple fields (2 posts)

  1. jinch
    Member
    Posted 1 year ago #

    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?

  2. Mohd Rafie
    Member
    Posted 1 year ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.