Im having problems with the form not validating at all. I can submit a blank form. I have form validation set to YES and the proper fields in the corresponding rules.
Is there something else I need to check?
I'm running the newest version for Joomla 1.5
Is there something else I need to check?
I'm running the newest version for Joomla 1.5
Hi diver165,
There is a problem with JavaScript conflicts with Joomla 1.5. Joomla loads the MooTools JavaScript Framework and ChronoForms loads the Prototype framework and the two run headlong into each other.
We're waiting on Max to release a new version for Joomla 1.5 that can use the MooTools framework (this already exists for Joomal 1.0.x).
Your problem could be something else but this is the most likely cause.
Bob
There is a problem with JavaScript conflicts with Joomla 1.5. Joomla loads the MooTools JavaScript Framework and ChronoForms loads the Prototype framework and the two run headlong into each other.
We're waiting on Max to release a new version for Joomla 1.5 that can use the MooTools framework (this already exists for Joomal 1.0.x).
Your problem could be something else but this is the most likely cause.
Bob
What I did was use the form validation script from http://clientside.cnet.com/cnet.gf/docs/files3/common/js-widgets/form-validator-js.html which is based on the Prototype form validation and then edit chronocontact.html.php
Change:
To:
I named the new form validator as validation.js also.
Change:
To:
That's it! As the mootools based validation script was based on the prototype one it just seems to work. Hope this helps.
Change:
<script src="components/com_chronocontact/js/prototype.js" type="text/javascript"></script>
<script src="components/com_chronocontact/js/effects.js" type="text/javascript"></script>
<script src="components/com_chronocontact/js/validation.js" type="text/javascript"></script>
To:
<script src="components/com_chronocontact/js/validation.js" type="text/javascript"></script>
I named the new form validator as validation.js also.
Change:
var valid = new Validation('<?php echo "ChronoContact_".$rows[0]->name; ?>', {immediate : true, onFormValidate : formCallback});
To:
var valid = new FormValidator('<?php echo "ChronoContact_".$rows[0]->name; ?>', {immediate : true, onFormValidate : formCallback});
That's it! As the mootools based validation script was based on the prototype one it just seems to work. Hope this helps.
Because of all the javascript issues now - and in the future - as well as it not being best validation method anyway, I still would prefer to see it done with PHP.
Hope to see it implemented someday, or maybe some PHP code snippets we could all share and use for CronoForms?
Best wishes,
- Vince
Hope to see it implemented someday, or maybe some PHP code snippets we could all share and use for CronoForms?
Best wishes,
- Vince
Hi Vince,
I don't know what Max's plans are but I'd be surprised if server-side validation was high on the list if only because there are an almost infinite number of things that could be validated and it's pretty easy to do with PHP.
What might be useful is an extra input box to include the code for a validation function that would return either 'true' or an error message. ChronoForms could then either process or re-show the form and error message. In practice you can do this now in the OnSubmit before email box, though you need to include showform() to redisplay.
Bob
I don't know what Max's plans are but I'd be surprised if server-side validation was high on the list if only because there are an almost infinite number of things that could be validated and it's pretty easy to do with PHP.
What might be useful is an extra input box to include the code for a validation function that would return either 'true' or an error message. ChronoForms could then either process or re-show the form and error message. In practice you can do this now in the OnSubmit before email box, though you need to include showform() to redisplay.
Bob
Hi Bob,
Do you have some PHP code snippet examples?
Maybe open a topic that we can all share some?
Thanks,
- Vince
Do you have some PHP code snippet examples?
Maybe open a topic that we can all share some?
Thanks,
- Vince
This topic is locked and no more replies can be posted.