Title: Gravity Forms &#8211; php code to check multiple fields
Last modified: August 20, 2016

---

# Gravity Forms – php code to check multiple fields

 *  [jinch](https://wordpress.org/support/users/jinch/)
 * (@jinch)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/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](https://wordpress.org/support/users/mohdrafie/)
 * (@mohdrafie)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/gravity-forms-php-code-to-check-multiple-fields/#post-3187820)
 * Hi there,
 * We don’t actually support this issue since it is a commercial plugin. You can
   ask the question at their [support forum](http://www.gravityhelp.com/forums/).
 * 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.

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 1 reply
 * 2 participants
 * Last reply from: [mohdrafie](https://wordpress.org/support/users/mohdrafie/)
 * Last activity: [13 years, 6 months ago](https://wordpress.org/support/topic/gravity-forms-php-code-to-check-multiple-fields/#post-3187820)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
