The Foxy forums are on the move!

We're in the process of moving our forums over to a new system, and so these forums are now read-only.
If you have a question about your store in the meantime, please don't hesitate to reach out to us via email.

Costumer file upload on checkout

Hi, is possible to have a file upload field on checkout?
  • fc_adamfc_adam FoxyCart Team

    It is! While we don't support it natively, it is possible to add in a custom option for uploading files using a service like Uploadcare - you can see a quick tutorial on using that here:
  • enmincenminc Member
    edited October 2018
    Here is a working solution to make the Uploadcare Widget required on checkout.

    Note: Since the widget uses a hidden field to store the url of the uploaded file the data-required attribute will not work. Below is a javascript solution along with error flagging.

    Note#2: Your will have to play with the selector for the addClass and removeClass calls. Depending on how you have added the widget to the checkout and the possible custom html markup around the widget you may need to adjust to get the class in the proper container. #file-container will not work as copied below on its own.

    <script type="text/javascript">

    function checkForFile() {
    var haveFile = jQuery('input[name="file"]').val();
    if (haveFile !== '') {
    return true;
    } else {
    alert("Documentation - Is Required");
    return false;
    var widget = uploadcare.Widget('[role=uploadcare-uploader]');

    widget.onUploadComplete(function(info) {
    //alert('upload complete');

    FC.client.on("checkout-submit", checkForFile);
  • brettbrett FoxyCart Team
    @enminc Awesome. Thanks for sharing!
Sign In or Register to comment.