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

Does not send all data #7

Open
todordev opened this issue Aug 13, 2012 · 1 comment
Open

Does not send all data #7

todordev opened this issue Aug 13, 2012 · 1 comment

Comments

@todordev
Copy link

Hi Arian,
Thank you for the great extension! I have a suggestion.

It will be great if the script sends all form data.
For example:
If I have an inputs for image size ( width, height ), I would like to get this data.
I will be happy If these values come with the files data.

Cheers,
Todor

@r4zielrc
Copy link

In the line 106 in Form.Upload.js

Change this

submit: function(inputFiles, inputname, uploadReq){
    inputFiles.getFiles().each(function(file){
        uploadReq.append(inputname , file);
    });
    uploadReq.send();
},

For this

submit: function(inputFiles, inputname, uploadReq){
    inputFiles.getFiles().each(function(file){
        uploadReq.append(inputname , file);
    });

            var form = document.getElementById('chronoform_upload');
            var controls = form.getElementsByTagName('input');

            for (var i=0, iLen=controls.length; i<iLen; i++) {
                uploadReq.append(controls[i].name, controls[i].value);

            }       


    uploadReq.send();
},

document.getElementById('chronoform_upload'); <-- change the Id form

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