Hi everyone, i am a happy user of Chronoforms, it is very powerful. I am exploring in more and more depths its possibilities and i'm suggesting it to all my customers (some of them may even accept to PAY for it as i did :-) ). Thank you very much guys!
Short question: what's the cleanest way to make Joomla registration OPTIONAL?
Long question: I already used Joomla registration plugin and, on another form, CURL plugin for AcyMailing integration. Now i am going to create a form that does both; but - as per customer request - while AcyMailing subscription is mandatory, Joomla registration should be optional.
I have no problem at hacking some PHP code if necessary.
Thank you in advance for your time.
--
Franz (zanardi)
Short question: what's the cleanest way to make Joomla registration OPTIONAL?
Long question: I already used Joomla registration plugin and, on another form, CURL plugin for AcyMailing integration. Now i am going to create a form that does both; but - as per customer request - while AcyMailing subscription is mandatory, Joomla registration should be optional.
I have no problem at hacking some PHP code if necessary.
Thank you in advance for your time.
--
Franz (zanardi)
After a few research, i can reply to myself. "Extra code" is eval'd during the "onSubmit" function of cf_joomla_registration class.
Now, "eval" is a function which returns "NULL" UNLESS you specify a "return (something)" into the eval'd code.
So i changed the code like this (cf_joomla_registration.php v.3.0 line 319):
from
to
After that, i can insert into my "Extra code" something like:
where of course "enable_registration" is the name of a check box field in my form.
Hope this will help someone.
Now, "eval" is a function which returns "NULL" UNLESS you specify a "return (something)" into the eval'd code.
So i changed the code like this (cf_joomla_registration.php v.3.0 line 319):
from
eval( "?>".$row->extra4 )
to
if ( eval( "?>".$row->extra4 ) == "STOP" ) return;
After that, i can insert into my "Extra code" something like:
if ( !$_POST['enable_registration'] ) return "STOP";
where of course "enable_registration" is the name of a check box field in my form.
Hope this will help someone.
This topic is locked and no more replies can be posted.