Display file metadata as default value in file upload field

By: Enrico Brugnoni | Asked: 07/20/2023
ForumsCategory: General questionsDisplay file metadata as default value in file upload field
Enrico Brugnoni asked 1 year ago

In formidable it's possible to use [user_meta key='user meta'] to display the user meta into a field as default value.

I have a user that has a file for metadata, is it possible to display it in the upload field like you would with a text?

Example (During registration he user uploads a photo assigned to the meta 'profile_picture', is it enough that i put [user_meta key=''profile_picture'] into the dafault value of a upload file field? Because when i do so, a blank file called "doc.svg" appears instead of the file that has been uploaded as meta, could this be an issue with file permissions?)

1 Answers
Victor Font answered 1 year ago
You have to examine the data to see what's actually stored in wp_usermeta for the field value. It's possible, it's just an id to the attachment link. Uploaded fields shouldn't be stored in the database. We only normally see the item_id of the attachment.
Enrico Brugnoni replied 1 year ago

when i try to use that meta into a text field the following appears "file_fcf30066_d9b9a8330b67e6478152c63b45088aad2acfaff1.pdf" so the [user_meta key='user meta'] is actually getting this file, however, it not being displayed and a blank document called "doc.svg" appears, why?

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right