Multi-Select Checkbox Field to Zoho CRM Multiple Line Field

When I use the gravity form zoho plugin to push data from my lead from into my lead page in Zoho CRM.

The data from the Multi-Select Checkbox Field to Zoho CRM Multiple Line Field is shown as below.
[“MON 3pm-6pm”, “MON 6pm-10pm”]

I would like it to be:
MON 3pm-6pm
MON 6pm-10pm

Could someone help me with this? Or is it something I need to configure on the ZOHO CRM side?

Please see example 6 of the gform_{$SHORT_SLUG}_field_value filter:

Hi @chrishajer ,

Thank for your reply and pointing me in the right direction.

Not much of a programmer so if you could indulge me further it would be much appreciated.

So if the form id is 4 and I would like all the multiple checkbox fields to be converted to the array element per line format before sending it to gravity forms, would the following code be correct?

add_filter( 'gform_zohocrm_field_value', function ( $value, $form, $entry, $field_id ) {
    $field = GFAPI::get_field( 4, $field_id );
     
    if ( is_object( $field ) && $field->get_input_type() === 'checkbox' ) {
        $value = explode( ', ', $value );
    }
     
    return $value;
}, 10, 4 );

Also, for the explode function, would it show on my Zoho as:
MON 3pm-6pm
MON 6pm-10pm

or

“MON 3pm-6pm”
“MON 6pm-10pm”

Thanks again Chris

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