Webflow Form Information - Hidden Data

Hey everyone!
First of all thanks for this splendid tool!

I have a question regarding webflow integration, I’d like to know if I can add more fields to the hidden data passed through my form?

Getting on Zapier the submitted form data, I have only the URL and I’d like the uuid. I’ve managed to do a regex to extract it but I don’t like the lack of stability of this process.
Do I have any way of passing the pure ID information directly?

Hi @aplayers21,

Thank you for your question! The hidden input element of the widget takes a CDN URL as a value by default, and there’s no way to change this, but you can solve this using the widget’s API. First, you’ll need to add one more hidden input to your form

<input type="hidden" name="file_uuid" id="uc-file-uuid" />

When a user uploads a file, you can get the file’s UUID using the onUploadComplete method

var uuidField = document.querySelector("#uc-file-uuid");
var widget = uploadcare.Widget("[role=uploadcare-uploader]");

widget.onUploadComplete(function(fileInfo) {
  uuidField.value = fileInfo.uuid;

Also, you can extract some other file-related info from the fileInfo object, e.g. name, size, mime type, image information, etc.