jQuery UI Widgets Forums General Discussions Using jqxFileUpload in a form

Tagged: 

This topic contains 2 replies, has 3 voices, and was last updated by  Pabloinator 1 year, 7 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • Using jqxFileUpload in a form #121125

    antonomase
    Participant

    Hi,

    I want to construct a form with several classical fields (name, forname,…) and a field for uploading a file
    When I click on the button Browse, the select box is opened but the form is submitted.

    $('#name').jqxInput();
    $('#jqxFileUpload').jqxFileUpload();
    ...
    <form action="/submit.php" method="post" enctype='multipart/form-data'>
    <input id='name' type='text' name='name' />
    <div id="jqxFileUpload"></div>
    </form>'

    Is it possible to use jqxFileUpadload in a form ?

    Best regards

    • This topic was modified 2 years, 4 months ago by  antonomase.
    Using jqxFileUpload in a form #121164

    ivanpeevski
    Participant

    Hi antonomase,

    The jqxFileUpload component has its own hidden form element so that it can upload the attached files and nesting it inside other form elements is not recommended.
    I suggest putting the jqxFileUpload outside the form. Then if you wish to upload the files at the same time as the form, you can use the onsubmit JS event.
    You can have a look at the fiddle here: https://jsfiddle.net/mwakhdj7/6/

    If you have any other questions, please do not hesitate to contact us again.
    Best regards,
    Ivan Peevski
    jQWidgets Team
    https://www.jqwidgets.com

    Using jqxFileUpload in a form #122532

    Pabloinator
    Participant

    Thank you man

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.