Differences from V6 to V7

ts tshirley 19 Jun, 2020
Hi,
​
I have not got too far into V7 development but immediately I noticed that the very useful V6 actions for logic flow in a form - Switcher and Event Switcher - are not there. It appears that new functionality in the Redirect action can achieve the Event Switcher. Is this the intention, or is there another way?
​
Is the V6 syntax for shortcodes and and referencing data in php still the same? That is, things like using $this->data['field_name'] in php, the functions $this->set() and $this->get(), {data:field_name} and {var:return_value} in Actions and so on?
​
Is there any simple example for the code of a custom rule for field validation? For example if I want Field 2 to always be greater than what the user entered in Field 1?
​
Actually a manual like the V6 one would be very helpful and I'm sure it is on the way, but if I can get answers to the above it will get me started quite well
​
Thanks
​
Tim
Max_admin Max_admin 20 Jun, 2020
Hi Tim,
​
For switching: use the "Run Conditions" behaviors in the "Data" behaviors section, if you want to switch multiple units then place them inside a Group
​
For shortcodes syntax: yes, all the same, except few changes to some unpopular codes, like {uuid:}, now it's {str:uuid} and so on
​
For custom validation: the hint explains it well, here is an example code:
function test(value){if(value < $("another_field_id").val()){return false;}return true;}
Yes, a manual is supposed to arrive a bit later, maybe some videos will be made first!
​
Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
ts tshirley 20 Jun, 2020
Thanks Max,
​
So trying this, I set a simple form up with Text 1 and Text 2 fields, to send an email after a Button click. This worked with no validation.
​
So I placed a custom validation In Text 2 field, with the following php:
Max_admin Max_admin 20 Jun, 2020
your PHP did not make it, there is a problem here in the forums with code pasting sometimes, so you may need to take a screenshot instead!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
ts tshirley 20 Jun, 2020
Hi Max,
​
Sorry, my mistake, I sent before I was ready.
​
I think it is working OK except for the error message, as the attached screenshot shows the validation worked but only displayed the first 5 characters of the error message.
​
Cheers
​
Tim[file=13124]CF7_Validation_Screenshots.docx[/file]
Max_admin Max_admin 20 Jun, 2020
Hi Tim,
​
Thanks for reporting this, it's a bug which I have fixed here, the custom rule error message was not being used, instead it was using the default message!
​
Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.