Filters
Slugs
Available filters
{slug}_render_formfield_data()
add_filter('useyourdrive_render_formfield_data', 'render_formfield_data', 10);
function render_formfield_data($data, $ashtml = true){
// Read the array of files stored in the submission
$uploaded_files = json_decode($data, true);
// Continue if we aren't receiving any files
if (empty($uploaded_files) || (0 === count($uploaded_files))) {
return $data;
}
// Render a very basic list
$formated_value = '';
foreach ($uploaded_files as $file) {
$formated_value .= basename($file['path'])." ({$file['size']})\r\n";
}
return $formated_value;
} {slug}_apply_placeholders()
{slug}_is_entry_authorized()
Last updated