Uploading files via value attribute

Home Forums Quform WordPress Uploading files via value attribute

This topic is: not resolved
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #20150
    MGK
    Participant

    Hi,

    I wish to use upload buttons in my form, with required options activated.
    But instead of having a type=”file” and the current system, I want to have images uploaded in the value attribute (because I want to allow people to crop them prior to uploading them).
    So at the moment, when a user uploads a file, they can directly crop the images, and some data are passed in the value attribute of the input tag.

    However, when using that system, when hitting the submit button, it doesnt detect that I uploaded anything, is it possible to fix that in any way ?

    That would be a game saver !!

    thanks a lot

    day

    PS : how does the upload part work ? when hitting submit, the form will look at the “name” ? or the “class” ? or how ? because what I have currently is :


    <input class="iphorm-element-file iphorm_1_18" type="file" tabindex="-1" accept="image/jpeg,image/png,image/gif,image/bmp">

    and this (I edited it a bit), created via my ‘cropping’ script :


    <input type="hidden" name="iphorm_1_18" value="{"server":null,"meta":{},"input":{"name":"136269554_n.jpg","type":"image/jpeg","size":61816,"width":960,"height":720},"output":{"width":399,"height":399,"image":"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2oTknvd/jf8Ef0l9Iyk8RPIpxVm6CbaVm7UoNXtZ+v5n2zPfT30/B/0P2Gef8A9f8AT2r1D+ZZ6KK8vysQeSv+c/40Hn1Onz/Q5XxxB+4s/P8A7R+x/wDUO7/j/nn0oIpydCXM3orNrX9GeSeDv2c7H4j+P7zXJ7P+/EdPQp9fl+oEtaHOf/Z"},"actions":{"rotation":0,"crop":{"x":440.00000000000006,"y":320.1305483028721,"width":399.99999999999994,"height":399.8694516971279,"type":"manual"},"size":null}}" class="iphorm-element-file iphorm_1_18">

    • This topic was modified 7 years, 6 months ago by MGK.
    • This topic was modified 7 years, 6 months ago by MGK.
    #20168
    MGK
    Participant

    Hi Ally,

    I am still working on my code and made a simple version of my form.

    One required upload button for an image, one jquery script to allow user to crop their image.

    When hitting submit, an error message saying “this field is required” appears but I can see the image in the form !

    Can’t find a way to solve the issue, can you please help me ?
    I can provide you with ftp access and wordpress access.

    day

    #20173
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy