zborek

problem with 'file' field

7 posts in this topic

Hi,

I have a website with a form with a field of type 'file'.

When I try to send the form, I get a white page with info for example: {"success": false, "messages": "[\" This field is required \ "....}

I have a version of the module 2.1.5 and J! 3.4.8

Please help solve the problem

Regards,

Gregory

Share this post


Link to post
Share on other sites

Hi zBorek.

I'm so sorry, we are in Lunar New Year holiday, so i didn't support you in time.

I found out reason of this problem, that is jquery conflict.

With this problem please open file modules/mod_btquickcontact/helpers/helper.php

Find this code

if ($loadJquery) {

$document->addScript(JURI::root() . 'modules/mod_btquickcontact/assets/js/jquery.min.js');

}

and change it to

if ($loadJquery) {

if(version_compare(JVERSION, '3.0', 'ge')){

JHtml::_('jquery.framework');

}else{

$document->addScript(JURI::root() . 'modules/mod_btquickcontact/assets/js/jquery.min.js');

}

}

or just only this (if you are using Joomla 3.x)

if ($loadJquery) {

JHtml::_('jquery.framework');

}

Best regards

Share this post


Link to post
Share on other sites

Thanks for your answer.

I hope your holidays were cool :)

Unfortunnely your hint did not work.

I used J! 3.4.8 that was mentioned in the other part of your code but nothing has changed on website.

Regards,

Gregory.

Share this post


Link to post
Share on other sites

Hi, problem isn't solved yet.

There are two forms on this site. First one is working fine and the second (lower) one is generating error.

Did You check the right one?

If i will disable the file loading field it works fine.

Share this post


Link to post
Share on other sites