Validation not working on overlay popup when page onload

alwincnk 14 Oct, 2013
Hi,

I have loaded the chronoform module in my autoload modal upon entering the site.

Everything works well except the form validations.

To go to the site, <!-- w --><a class="postlink" href="http://www.titijaya.com.my">www.titijaya.com.my</a><!-- w -->
GreyHead 14 Oct, 2013
Hi alwincnk,

I only managed to see the autoload form once briefly - as soon as you test it seems to disappear for ever.

At a guess the autoload module isn't loading the script files needed for the validation.

Bob
alwincnk 14 Oct, 2013
Hi! Appreciates your prompt response GreyHead!

The autoload is based on Session which needs to clear cookie to make it show again.

Yes. It is not loading the necessary scripts. But i'm not sure what are the scripts required for the validation to make it work.
GreyHead 14 Oct, 2013
Hi alwincnk,

If you check the Contact form where the validation is working you can see the files that ChronoForms loads from the /components/com_chronoforms/css/formcheck and /components/com_chronoforms/js/formcheck folders.

Bob
alwincnk 14 Oct, 2013
Hi there,

I tried putting in the following scripts:

components/com_chronoforms/js/formcheck/formcheck-yui.js" type="text/javascript">
components/com_chronoforms/js/formcheck/formcheck-max.js" type="text/javascript">
components/com_chronoforms/js/formcheck/lang/en.js" type="text/javascript">
components/com_chronoforms/css/frontforms_tight.css
components/com_chronoforms/css/formcheck/theme/classic/formcheck.css
components/com_chronoforms/css/formcheck_fix.css

window.addEvent('domready', function() {
document.id('chronoform_register_interest_form').addClass('hasValidation');
formCheck_register_interest_form = new FormCheckMax('chronoform_register_interest_form', {
onValidateSuccess: $empty,
display : {
showErrors : 0,
errorsLocation: 1 }
});
});



but also cant get the validation works
GreyHead 14 Oct, 2013
Hi alwincnk,

Now I can see a jQuery error on the page

TypeError: a is undefined
...ction(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,ar...


This is most likely because you have JQuery and MooTools running together and jQuery isn't being correctly put into noConflict mode.

Bob
Dmayak 07 Nov, 2013
Hello, I am have a problem with validation in modal window too, but I am not loading a form in iframe, I am opening it into the page with plugin
<div id="form">
<div class="modal_form">
{chronoforms}Contact{/chronoforms}
</div>
</div>
with modal_form class set to display:none, and open it on the same page with
<a href="#form" class="modal" rel="{size: {x: 480}}">Contact button</a>

I don't know why validation is not working, it is on the same page so scripts are loaded, no javascript errors shown in the console, and if I reveal hidden original block, validation is working fine there.
GreyHead 07 Nov, 2013
Hi Dmayak ,

Please post a link to the form so I can take a quick look.

Bob
Dmayak 29 Nov, 2013
There seemed to be ether a problem with dublicate id's because the form already existed, or validation event just have not been assingned to the second form, I have solved it with changing the modal to iframe mode.
This topic is locked and no more replies can be posted.