We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4172
    • 5,888 Posts
    $allowedExtensions = $this->modx->getOption('allowedExtensions', $config, 'jpg,jpeg,png,gif');


    doesn't look like its hardcoded. 'jpg,jpeg,png,gif' is just the default.
      -------------------------------

      you can buy me a beer, if you like MIGX

      http://webcmsolutions.de/migx.html

      Thanks!
      • 42046
      • 436 Posts
      Well, for whatever reason it's not being passed on from either the snippet call or the default properties.
        • 40957
        • 7 Posts
        Hello, I need help.
        AjaxUpload working with Formit. Everything works fine.
        I can not understand how I paste in email, a list of uploaded files with links to download.
        • Normally all uploaded image files are filled comma separated in the placeholder referenced with the ajaxuploadFieldname parameter with the AjaxUpload2Formit hook.

          If you want to build a link list out of that, you have to modify this list by an output modifier.
            • 40957
            • 7 Posts
            I can not understand what the problem is:
            Calling Formit:
            [[!AjaxForm? 
                &form=`Tpl.request.outer`
                &hooks=`email,AjaxUpload2Formit`
                &preHooks=`Formit2AjaxUpload`
                &ajaxuploadFieldname=`image`
                &ajaxuploadTarget=`images/user/`
                &ajaxuploadFieldformat=`csv`
                &ajaxuploadUid=`image`
                &emailSubject=`Заявка на расчет с сайта ZONTMEDIA.ru`
                &emailTo=``
                &emailFrom=``
                &emailTpl=`Tpl.request.email.outer`
                &validate=`name:required,phone:required,email:required`
                &validationErrorMessage=`В форме содержатся ошибки!`
                &successMessage=`Сообщение успешно отправлено`
                &frontend_js=`` 
                &frontend_css=``
                &allowedExtensions=`jpg,jpeg,png,gif,psd,ai,cdr,doc,docx,xls,xlsx,dwg,dfx,pdf,eps,svg,zip,7zip,rar,pages,numbers` 
                &maxFiles=`5` 
                &maxFilesizeMb=`25` 
                &addCss=`0` 
                &uid=`image`
            ]]
            


            Call in form itself:
            [[!AjaxUpload? 
                &allowedExtensions=`jpg,jpeg,png,gif,psd,ai,cdr,doc,docx,xls,xlsx,dwg,dfx,pdf,eps,svg,zip,7zip,rar,pages,numbers` 
                &maxFiles=`5` 
                &maxFilesizeMb=`25` 
                &addCss=`0` 
                &uid=`image`
                &frontend_js=`` 
                &frontend_css=``
            ]]
            


            In "Tpl.request.email.outer" insert placeholder [[+image]], but the letter did not come. Although the pictures are loading. [ed. note: yurgeman last edited this post 9 years, 6 months ago.]
            • I don't see any issues in your calls. Could you edit the AjaxUpload2Formit snippet and insert a line
              die(var_dump($ajaxuploadValue)); 

              after the line 64. Just to see if it is executed and what value is in there. [ed. note: Jako last edited this post 9 years, 6 months ago.]
                • 40957
                • 7 Posts
                Nothing has changed
                • Sorry, did not see one important issue:
                  &hooks=`AjaxUpload2Formit,email`

                  Otherwise the email placeholders are not filled by AjaxUpload2Formit.
                    • 40957
                    • 7 Posts
                    Hey, did as you said. But then stopped sending email
                    • Are there any errors in the browser console? AjaxUpload relies on jQuery. Which version do you have installed (not sure if it works in 2.x)?