Gravity Forms – Monday creating single link from multiple files

Hi, I am adding a list of uploaded files via Gravity Forms to a board using Zapier (“Create update in”). However, when there’s multiple files, is treating the whole list as a single link and auto-generating an incorrect URL.

Returned code example via gravity forms

[Files] => Array
            [0] =>
            [1] =>

However, when I insert the “Files” field into it’s returned as a single link such as

<a href=",">,</a>,

How can this be returned a the correct 2 file references?


— Christiaan

Ended up fixing this by returning full HTML formatted links from a Gravity Forms Zapier hook – below for reference.

// returns files to Zapier as HTML rather than CSV / json to fix integration
add_filter( 'gform_zapier_field_value', function ( $value, $form_id, $field_id, $entry ) {
    $field = GFAPI::get_field( $form_id, $field_id );

    if ( $field instanceof GF_Field_FileUpload && $field->multipleFiles && ! empty( $value ) ) {
        $files = json_decode( $value );
		$value = "";

		foreach ($files as $file) {

			$value .= '<a href="'.$file.'">'.$file.'</a><br><br>';

    return $value;
}, 10, 4 );

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