Hi
At the moment my form has several required fields, and as the user misses one out a little line of text appears under the box to tell them off.
When I built forms by hand I used to use php so that no errors come up until after the submit button has been pressed. I don't really want to re-write a load of code, if this lovely component can do it for me.
Is there a way to get the form to pop up these error messages only when the user hits the submit button?
Thanks
E
At the moment my form has several required fields, and as the user misses one out a little line of text appears under the box to tell them off.
When I built forms by hand I used to use php so that no errors come up until after the submit button has been pressed. I don't really want to re-write a load of code, if this lovely component can do it for me.
Is there a way to get the form to pop up these error messages only when the user hits the submit button?
Thanks
E
Hi maxelcat,
I don't think so - there may be an option but if so I don't remember it.
You can add your PHP to do server-side validation in the box on the Validation tab if you prefer.
Bob
I don't think so - there may be an option but if so I don't remember it.
You can add your PHP to do server-side validation in the box on the Validation tab if you prefer.
Bob
Hi, look at components/com_chronocontact/chronocontact.html.php and find:
change it to
Cheers
Max
immediate : true
change it to
immediate : false
Cheers
Max
Hi
thanks for the replies. I have changed immediate : false as suggested.
And its closer to what I want. However, it only shows 1 error at a time, so if the user made 2 mistakes only the first one is shown at the first submit. - is there a way to get all the errors in one go?
thanks again
E
thanks for the replies. I have changed immediate : false as suggested.
And its closer to what I want. However, it only shows 1 error at a time, so if the user made 2 mistakes only the first one is shown at the first submit. - is there a way to get all the errors in one go?
thanks again
E
I don't think this can be done without some hack to the JS code of the validation file!
Cheers
Max
Cheers
Max
Hi
Thanks again for the reply
I added stopOnFirst : false as suggested, but it didn't seem to do what I wanted
Here's where I added it :
was that correct?
Thanks
E
Thanks again for the reply
I added stopOnFirst : false as suggested, but it didn't seem to do what I wanted
Here's where I added it :
var valid = new Validation('<?php echo "ChronoContact_".$rows[0]->name; ?>', {immediate : false, stopOnFirst : false, useTitles : true, onFormValidate : formCallback});
was that correct?
Thanks
E
Hi Maxelcat,
The next step is for you to get FireFox with the Firebug extension and debug the JavaScript.
Bob
The next step is for you to get FireFox with the Firebug extension and debug the JavaScript.
Bob
This topic is locked and no more replies can be posted.