Skip to content

file input inside vex.open() #278

@tristanthar

Description

@tristanthar

I'm trying to implement a file upload functionality with vex.

This is my code (taken from the documentation):
vex.dialog.open({ message: 'Select your document', input: [ '<div class="ed-modal-input-field-wrapper">', '<label for="ed_doc">Document</label>', '<div class="ed-modal-input-wrapper">', '<input name="ed_doc" id="ed_doc" type="file" />', '</div>', '<p><small>Accepted file formats: .docx, .doc and .otf</small></p>', '</div>' ].join(''), callback: function(data) { if (!data) { return console.log('Cancelled') } console.log('File', data.ed_doc) console.log(data); } });

However this always returns "undefined" in the callback function.

Are file inputs something that can be done with Vex?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions