Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
add_filter( 'caldera_forms_private_upload_directory', function( $directory, $field_id, $form_id, $transient_id ){
//IMPORTANT -- Change this to the ID of your field, or remove this conditional to affect all fields.
if( 'fld111' === $field_id ){
$uploads = wp_get_upload_dir();
$directory = $uploads[ 'basedir' ] . '/somepath';
return $directory;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment