Title: Gravity Form checkboxes mapping
Last modified: August 24, 2016

---

# Gravity Form checkboxes mapping

 *  [mufus](https://wordpress.org/support/users/mufus/)
 * (@mufus)
 * [11 years ago](https://wordpress.org/support/topic/gravity-form-checkboxes-mapping/)
 * I have a Gravity Form with Checkboxes.
    When this form is submitted, each checkbox
   is posted as its own value (see input_7_* below).
 *     ```
       *** Post (Form) ***
       https://www.example.com/contact/
       Array
       (
           [input_1_3] => Donald
           [input_1_6] => Duck
           [input_4] => email@example.com
           [input_7_1] => Option 1
           [input_7_2] => Option 2
           [input_7_5] => Option 5
           [input_7_7] => Option 7
       )
       ```
   
 * This is hard to work with, as you would need to re-define the “3rd-Party Integration
   Service” settings if you add a new checkbox option.
 * For the moment I’ve solved this by using the hooks to modify the data, but perhaps
   there should be some built-in function for this as I think this might be a common
   issue?
 * What I would like to see, is, instead of mapping…
 *     ```
       input_7_1 -> myoptions
       input_7_2 -> myoptions
       input_7_3 -> myoptions
       input_7_4 -> myoptions
       input_7_5 -> myoptions
       input_7_6 -> myoptions
       input_7_7 -> myoptions
       ```
   
 * …making it possible to set up one mapping, such as:
    `input_7_* -> myoptions`
 * Or is there already another implemented solution to this problem I see?
 * [https://wordpress.org/plugins/forms-3rdparty-integration/](https://wordpress.org/plugins/forms-3rdparty-integration/)

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

 *  Plugin Author [zaus](https://wordpress.org/support/users/zaus/)
 * (@zaus)
 * [11 years ago](https://wordpress.org/support/topic/gravity-form-checkboxes-mapping/#post-6094726)
 * Hm…might be able to add regex handling to the mapping, although for non-GF users
   it’d be “unnecessary” processing, which I try to avoid baking in to the plugin.
   Or I could alter how submissions are [acquired from GF](https://github.com/zaus/forms-3rdparty-integration/blob/master/plugins/gravityforms.php#L77),
   although I try to avoid making potentially breaking changes for existing users.
 * Maybe a late [hook on `get_submission`](https://github.com/zaus/forms-3rdparty-integration/blob/master/forms-3rdparty-integration.php#L420)
   to manipulate the submission before my plugin does the mapping. Or could make
   a plugin hooking on `filter_post` that would duplicate [the mapping section](https://github.com/zaus/forms-3rdparty-integration/blob/master/forms-3rdparty-integration.php#L432)
   with the regex processing.
 * As an aside, I originally wrote this plugin for Contact Form 7, which has much
   less problems with mappings (and particularly your problem) because you have 
   control over how the input `name` is generated.
 *  Thread Starter [mufus](https://wordpress.org/support/users/mufus/)
 * (@mufus)
 * [11 years ago](https://wordpress.org/support/topic/gravity-form-checkboxes-mapping/#post-6094729)
 * I agree, the plugin shouldn’t process unnecessary code if not needed.
    What about
   a checkbox-option for each service, where you can enable regexp processing or
   not on the mappings?
 * With the temporary hook I created now, I had to hard-code the “input_7_*” processing,
   which isn’t ideal.
 * I used CF7 in the beginning, but GF is so much better so I’m not going back to
   CF7 again 🙂

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

The topic ‘Gravity Form checkboxes mapping’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/forms-3rdparty-integration.svg)
 * [Forms: 3rd-Party Integration](https://wordpress.org/plugins/forms-3rdparty-integration/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/forms-3rdparty-integration/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/forms-3rdparty-integration/)
 * [Active Topics](https://wordpress.org/support/plugin/forms-3rdparty-integration/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/forms-3rdparty-integration/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/forms-3rdparty-integration/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [mufus](https://wordpress.org/support/users/mufus/)
 * Last activity: [11 years ago](https://wordpress.org/support/topic/gravity-form-checkboxes-mapping/#post-6094729)
 * Status: not resolved