Hi hellykun,
Please check the custom validation box info under the validation tab in v5 rc4.1, its explained how to write a custom function in v5, you can then write your function name there and it will be used.
Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Thanks a lot GreyHead.
The problem was not only that but the el.push.message is not receiving the correct message so I thought it was not registering at all.
Is there a way of adding custom PHP Server validation to Chronoforms V5. It is not possible for me to go to V4 only for this feature. Can I change a specific php file to achieve this?
Thanks a lot.
HI hellykun,
I'm afraid that so far I know nothing about the CFv5 code and what can (or can't) be changed :-(
Bob
Hi,
The code above is a javascript validation, if you need php server validation then simply use the "server side validation" action for auto validation, or the "Event switcher" action for custom stuff.
Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Thanks a lot.
Is there a guide on how to use the Event Swicher action because it is not so straightforward for me?
Because the validation I want to use is more complex than the predifined values of Server Side Validation.
Thanks a lot again.
Hi hellykun,
It's easy to use, just write your PHP code and make it return a string matching the event name you need to process, so suppose that you have 1 event in the event switcher called "test", then the code below will execute this event:
<?php
if(true){
return "test";
}
Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Thanks a lot admin, so how can I return stop submission of the form and show a message?
return false?
Just in case I would be nice if you can add a step by step tutorial for creating custom validation with php code because it is of high importance. If I succeed I will post it.
We will try to add more FAQs soon!
You can simply return "stop", and drag a "Show stopper" action in the "stop" event created using the "Event switcher".
Before that "show stopper" you may also add a "thanks message" action.
Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Thanks a lot admin!
I have added a custom validation rule by changing both chronoforms and joomla php files because it seemed easier to me.
That's not a good idea, you will lose these changes when you updates either Joomla or Chronoforms, and the updates are important sometimes!
Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.