Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

file input inside vex.open() #278

Open
tristanthar opened this issue Apr 28, 2019 · 1 comment
Open

file input inside vex.open() #278

tristanthar opened this issue Apr 28, 2019 · 1 comment

Comments

@tristanthar
Copy link

tristanthar commented Apr 28, 2019

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?

@codebru
Copy link

codebru commented Sep 20, 2019

I am also having this issue and am interested in whether it is possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants