1 回答

TA貢獻(xiàn)1995條經(jīng)驗(yàn) 獲得超2個(gè)贊
設(shè)法使用此獲取生成的Dropbox鏈接
add_action( 'gform_dropbox_post_upload', 'get_dropbox_urls', 10, 3 );
function get_dropbox_urls( $feed, $entry, $form ) {
print_r('started get drobbox');
foreach( $form['fields'] as &$field ) {
// NOTE: Replace 3 with your Dropbox field id.
$field_id = 158;
print_r($field_id,'the field id', $field);
if ( $field->id != $field_id ) {
continue;
}
// Get the field value.
$field_value = $entry[ $field->id ];
// Exit if field value is empty.
if ( rgblank( $field_value ) ) {
return;
}
// Decode JSON string.
$files = json_decode( stripslashes_deep( $field_value ), true );
print_r($files);
}
}
- 1 回答
- 0 關(guān)注
- 112 瀏覽
添加回答
舉報(bào)