# Patch to fix TAGs with Gravity ZOHO add-on!

**URL:** <https://community.gravityforms.com/t/patch-to-fix-tags-with-gravity-zoho-add-on/20111>\
**Category:** Get Help\
**Tags:** gform\_zohocrm\_record, zohocrm\
**Created:** [February 27, 2026, 8:39pm UTC](https://community.gravityforms.com/t/patch-to-fix-tags-with-gravity-zoho-add-on/20111 "2026-02-27T20:39:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![user5f72f9bc898a2060](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/user5f72f9bc898a2060/32/17141_2.png) [@user5f72f9bc898a2060](https://community.gravityforms.com/u/user5f72f9bc898a2060)\
**Post date:** [February 27, 2026, 8:39pm UTC](https://community.gravityforms.com/t/patch-to-fix-tags-with-gravity-zoho-add-on/20111/1 "2026-02-27T20:39:59Z")

</div>

Thanks to Google Gemini, it works!:

add to functions.php this:

```auto
add_filter( ‘gform_zohocrm_record’, ‘fix_zoho_tags_format’, 10, 5 );
function fix_zoho_tags_format( $record, $module, $feed, $entry, $form ) {

// Controlliamo che stiamo inviando ai Lead (o Contacts) e che esista il campo Tag
if ( $module === 'Leads' && isset( $record['data'][0]['Tag'] ) ) {
    
    $tag_value = $record['data'][0]['Tag'];
    
    // Se il tag non è vuoto, lo trasformiamo nell'array richiesto dalle API v2/v3 di Zoho
    if ( ! empty( $tag_value ) ) {
        $record['data'][0]['Tag'] = array(
            array( 'name' => $tag_value )
        );
    }
}

return $record;

}

```

TAGs now perfectly works.

If you want to credit me: [elan42.com](http://elan42.com)  
bye

---

<div class="post-metadata">

**Author:** ![GFNinja](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/gfninja/32/17140_2.png) [@GFNinja](https://community.gravityforms.com/u/GFNinja)\
**Post date:** [March 1, 2026, 2:42am UTC](https://community.gravityforms.com/t/patch-to-fix-tags-with-gravity-zoho-add-on/20111/2 "2026-03-01T02:42:40Z")

</div>

I am not sure, but as a developer it will surely fail if there are multiple tags. Possible a better option as below

```php
add_filter( ‘gform_zohocrm_record’, ‘fix_zoho_tags_format’, 10, 5 );

function fix_zoho_tags_format( $record, $module, $feed, $entry, $form ) {

  // Controlliamo che stiamo inviando ai Lead (o Contacts) e che esista il campo Tag

  if ( $module === 'Leads' && !empty($record['data'])) {

    // Se il tag non è vuoto, lo trasformiamo nell'array richiesto dalle API v2/v3 di Zoho

    foreach($record['data'] as $tagIndex => $tagData) {

      $record['data'][$tagIndex]['Tag'] = array(

        array( 'name' => $tagData['Tag'])

      );

    }

  }

  return $record;

}

```

---

<div class="post-metadata">

**Author:** ![user5f72f9bc898a2060](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/user5f72f9bc898a2060/32/17141_2.png) [@user5f72f9bc898a2060](https://community.gravityforms.com/u/user5f72f9bc898a2060)\
**Post date:** [March 1, 2026, 9:08am UTC](https://community.gravityforms.com/t/patch-to-fix-tags-with-gravity-zoho-add-on/20111/3 "2026-03-01T09:08:36Z")

</div>

good!  
give it a fix on the next versions 😉

I had to functions.php-ize this  
but I would like the plugin to works with TAGs natively

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/gravityforms1/original/2X/f/fef63f0599c45e0218c30d9f5d7ca8bff9b00189.png) [@system](https://community.gravityforms.com/u/system)\
**Post date:** [March 31, 2026, 9:09am UTC](https://community.gravityforms.com/t/patch-to-fix-tags-with-gravity-zoho-add-on/20111/4 "2026-03-31T09:09:31Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
