Title: Use filebox in crud Post by: Steve2106 on November 04, 2019, 03:17:58 AM Hi There,
I am using the crud demo as a starting point. I am collecting and saving a few fields like Name, Business etc and that is working well. I now want to put on the form a filebox which will upload a file. My issue is how do I automatically save the user info and upload the file all in one save button. Thanks for the help. Best Regards, Steve. Title: Re: Use filebox in crud Post by: stworthy on November 04, 2019, 08:02:56 PM Please refer the the code below.
Code: <form id="ff" action="..." enctype="multipart/form-data" method="post"> Title: Re: Use filebox in crud Post by: Steve2106 on November 05, 2019, 04:39:28 AM Hi StWorthy,
Than you for your reply. As mentioned I am trying to do this in EasyUI crud example. When I save the file details I would like to also save some details to the user file. I.E. filename, filetype etc. I do not know how to accomplish this. I have been able to upload a file but do not know how to use an sql statement to save details to database from within the file upload code. I really appreciate your help. Best Regards, Steve. Title: Re: Use filebox in crud Post by: stworthy on November 05, 2019, 08:07:06 PM Listen to the 'onChange' event and then call the 'files' method, you can retrieve all the information about the files you selected including name, size, type, etc. Please look at the code below.
Code: <input class="easyui-filebox" data-options=" |