Integrating chronoform to acajoom pro

riga75 09 Apr, 2009
Can you help to ensure that when one fills out a form created with chronoform (which among other things, I think the best way to do form in joomla), I automatically add the name to the newsletter?
In accajoom told me to follow these procedures:
http://www.ijoobi.com/index.php?option=com_content&view=article&id=7697&catid=29&Itemid=72/ # url
but I am a newbie and I can not understand what I do, can you help me?
I want one that when complete the form and sends it still loads the page where it says that the shipment of your (I created the page and I put the url of the Form-redirect URLs) and at the same time you register at newwsletter.

Thank you very much
Max_admin 09 Apr, 2009
Hi riga,

this looks easy, you need this in the form onsubmit code:


$MyForm =& CFChronoForm::getInstance();
$MyForm->setFormData("redirecturl", "index.php?option=com_acajoom&act=subscribe&name=".JRequest::getVar('name_field_name')."&email=".JRequest::getVar('email_field_name')."&listid=2");


change the listid per your acajoom data!

Cheers
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
riga75 09 Apr, 2009
Hi Max,
Meanwhile thanks for the help but I have some problemino:
I tried to include both in On Submit code - before sending email: that in On Submit code - after sending email:
but I made the recording in the newsletter
I am recording in the newsletter only if I put this code:
http://www. mysite .it/index.php?option=com_acajoom&act=subscribe & name = (name) & email = (email) & listid = 14
redirect url in that I only want that after one has completed the form to be redirected to the confirmation page email delivery occurred

Thanks

Stefano
Max_admin 10 Apr, 2009
Hi Stefano,

did my code above work ? did you replace the 2 fields names with real fields names from your form ? name_field_name and email_field_name

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
riga75 10 Apr, 2009

Hi Stefano,

did my code above work ? did you replace the 2 fields names with real fields names from your form ? name_field_name and email_field_name

Max



Yes, I put the two values is a (name_field_name) name and the other(email_field_name) is email.
Below we carry forward the code of my form


<table width="470" border="0"> 
    <tr>
      <td width="159">Cognome e Nome</td>
      <td width="224"><input type="text" name="nome" />*</td>
      <td width="178"> </td>
    </tr>
    <tr>
      <td>Indirizzo email</td>
      <td><input type="text" name="email" />*</td>
      <td> </td>
    </tr>
    <tr>
      <td colspan="3" align="center">Inserisci il codice: {imageverification}</td>
    </tr>
	      <tr>
	        <td colspan="3" align="center">(non c'è distinzione tra lettere maiuscole e minuscole)</td>
    </tr>    <tr align="center">
      <td colspan="3"><input type="submit" name="Submit" value="Invia" /> 
      * = Campi obbligatori </td>
    </tr>
  </table>
riga75 10 Apr, 2009
I asked for help to acajoom and they told me this:

What you need to do is use a socket to launch 2 URLs at the same time.

So that you can launch one URL to subscribe to Acajoom and you can redirect to the page you desire.



How do I put two in the redirect url?
Thank you
GreyHead 10 Apr, 2009
Hi riga75,

You can't have two 'ReDirect URLs' simply because you can't send the browser to two places at once.

Acajoom also allow a Redirect url though so I suggest that you use a two-step process.
<?php
// Get the ChronoForms data
$MyForm =& CFChronoForm::getInstance();

// Get the base url
$uri_base =& JURI::base();

// Create a new url object
$uri =& JURI::getInstance( $uri_base );

// Set the parameters for the Acajoom subscription
$params = array(
    'option' => 'com_acajoom',
    'act' => 'subscribe',
    'listid' => 14,
    'name' => JRequest::getVar('name_field_name'),
    'email' => JRequest::getVar('email_field_name'),
    'receive_html' => 1,
    'redirectlink' => $MyForm->formparams->redirecturl
    );
$query = $uri->buildQuery( $params );
$uri->setQuery( $query );

// Set the new ChronoForms ReDirect URL
$MyForm->setFormData( "redirecturl", $uri->toString() );
?>

This all looks a bit more complicated than it is - basically, it sets up a new url with the Acajoom parameters including an instruction to redirect back to the original ChronoForms Redirect URL.

NB: this uses code from the latest ChronoForms releases
NB: not tested and may need de-bugging

Bob
riga75 11 Apr, 2009
Sorry but I put the code in On Submit code - before sending email: or on Submit code - after sending email: ????
riga75 11 Apr, 2009
error:
Fatal error: Class 'CFChronoForm' not found in mysite.com/components/com_chronocontact/chronocontact.php(615) : eval()'d code on line 3
GreyHead 11 Apr, 2009
Hi riga75,

Which version of ChronoForms do you have installed?

Bob
riga75 11 Apr, 2009

Hi riga75,

Which version of ChronoForms do you have installed?

Bob



components: 3.1 RC2
plugin: 0.9/V3.1 RC2
GreyHead 11 Apr, 2009
Hi riga75,

OK - can you ugrade to RC4? Backup your form(s) first though.

Bob
riga75 11 Apr, 2009
now:

Fatal error: Class 'CFChronoForm' not found in /components/com_chronocontact/chronocontact.php(600) : eval()'d code on line 3
riga75 11 Apr, 2009
I installed the latest version, which is component plugin .. I tried but I load a blank page and does not record in the newsletter
riga75 11 Apr, 2009
other problem:
load the form if using the plugin I load the form but to me appears below this text:

. ', Eval ( "if (field.getProperty (' title ')) (fMessage_val_validate_email = field.getProperty (' title');}"); eval (" cfvalidate_ "+ field.getProperty ( 'name')+". add (Validate.Email, (failureMessage: fMessage_val_validate_email) );");) if (field.hasClass ( 'validate-url')) (var fMessage_val_validate_validate_url = 'Please enter a valid URL.'; eval ( "if (field. getProperty ( 'title')) (fMessage_val_validate_validate_url = field.getProperty ( 'title');}"); eval ( "cfvalidate_" + field.getProperty (' name')+". add (Validate.Format, (pattern: / ^ (http | https | ftp): \ / \ / (([A-Z0-9] [A-Z0-9_-] *) (\. [A-Z0-9] [A-Z0-9_-] *)+)(:( \ d +)) \ / • / i, failureMessage: fMessage_val_validate_validate_url) );");) if (field.hasClass ( 'validate-date-au')) (var fMessage_val_validate_date_au = 'Please use this date format: dd / mm / yyyy. For example 17/03/2006 for the 17th of March, 2006. '; Eval ( "if (field.getProperty (' title ')) (fMessage_val_validate_date_au = field.getProperty (' title');}"); eval (" cfvalidate_ "+ field.getProperty ( 'name')+". add (Validate.Format, (pattern: / (0 [1-9] | [12] [0-9] | 3 [01]) [- /. ] (0 [1-9] | 1 [012]) [- /.] (19 | 20) \ d \ d /, failureMessage: fMessage_val_validate_date_au) );");) if (field.hasClass ( 'validate-currency dollar-')) (var fMessage_val_validate_currency_dollar =' Please enter a valid $ amount. For example $ 100.00. ', Eval ( "if (field.getProperty (' title ')) (fMessage_val_validate_currency_dollar = field.getProperty (' title');}"); eval (" cfvalidate_ "+ field.getProperty ( 'name') + ". add (Validate.Format, (pattern: / ^ \ $? \ -? ([1-9] (1) [0-9] (0.2) (\, [0-9] (3) ) * (\. [0-9] (0.2 })?|[ 1-9] (1) \ d * (\. [0-9] (0.2)) | 0 (\. [ 0-9] (0.2 })?|( \. [0-9] (1,2 })?)$/, failureMessage: fMessage_val_validate_currency_dollar) );");) Validate.One_Required = function (elm, paramsObj ) (var paramsObj = paramsObj | | (); var message = paramsObj.failureMessage | | "Must Choose one"; var ready = false; var elm = paramsObj.elm; var p = elm.parentNode; var options = p.getElementsByTagName ( 'INPUT'); for (i = 0; 1) field.options [0]. selected = true; eval ( "if (field.getProperty ( 'title')) (fMessage_val_validate_one_required = field.getProperty ( 'title' );}") eval ( "var cfvalidate_" + field.getProperty ( 'name'). ('[]', replace'')+" = new LiveValidation (field, (validMessage: '', insertAfterWhatNode: field.parentNode });"); eval ( "cfvalidate_" + field.getProperty ( 'name'). ('[]', replace'')+". add (Validate.One_Required, (elm: field, failureMessage: fMessage_val_validate_one_required)) ");)))), $ ES ( 'select', $ ( 'ChronoContact_HomePage')). each (function (field) (eval (" var cfvalidate_ "+ field.getProperty ( 'name'). replace ( ' [] ','')+" = new LiveValidation (field, (validMessage:' '});"); if (field.hasClass (' validate-selection ')) (var fMessage_val_validate_selection =' Please make a selection '; if (field.size> 1) field.options [0]. selected = true; eval ( "if (field.getProperty ( 'title')) (fMessage_val_validate_selection = field.getProperty ( 'title');}"); eval ( "cfvalidate_" + field.getProperty ( 'name'). ('[]', replace'')+". add (Validate.Presence, (failureMessage: fMessage_val_validate_selection) );");))), $ ES ( 'textarea', $ ( 'ChronoContact_HomePage')). each (function (field) (eval ( "var cfvalidate_" + field.getProperty ( 'name'). ('[]', replace'')+" = new LiveValidation (field, (validMessage: '' });"); if (field.hasClass ( 'required')) (var fMessage_val_required = 'This field is required', eval ( "if (field.getProperty ( 'title')) fMessage_val_required = (field.getProperty ( 'title');}") eval ( "cfvalidate_" + field.getProperty (' name '). ('[]', replace'')+". add (Validate.Presence, ( failureMessage: fMessage_val_required) );");)));));

GreyHead 11 Apr, 2009
Hi riga75,

Have you updated the ChronoForms component to the latest RC 4.11 release?

Bob
riga75 12 Apr, 2009

Hi riga75,

Have you updated the ChronoForms component to the latest RC 4.11 release?

Bob



yes and the bot V3.1 RC4.11
riga75 12 Apr, 2009
if you want to create an account to admin
riga75 12 Apr, 2009

other problem:
load the form if using the plugin I load the form but to me appears below this text:

. ', Eval ( "if (field.getProperty (' title ')) (fMessage_val_validate_email = field.getProperty (' title');}"); eval (" cfvalidate_ "+ field.getProperty ( 'name')+". add (Validate.Email, (failureMessage: fMessage_val_validate_email) );");) if (field.hasClass ( 'validate-url')) (var fMessage_val_validate_validate_url = 'Please enter a valid URL.'; eval ( "if (field. getProperty ( 'title')) (fMessage_val_validate_validate_url = field.getProperty ( 'title');}"); eval ( "cfvalidate_" + field.getProperty (' name')+". add (Validate.Format, (pattern: / ^ (http | https | ftp): \ / \ / (([A-Z0-9] [A-Z0-9_-] *) (\. [A-Z0-9] [A-Z0-9_-] *)+)(:( \ d +)) \ / • / i, failureMessage: fMessage_val_validate_validate_url) );");) if (field.hasClass ( 'validate-date-au')) (var fMessage_val_validate_date_au = 'Please use this date format: dd / mm / yyyy. For example 17/03/2006 for the 17th of March, 2006. '; Eval ( "if (field.getProperty (' title ')) (fMessage_val_validate_date_au = field.getProperty (' title');}"); eval (" cfvalidate_ "+ field.getProperty ( 'name')+". add (Validate.Format, (pattern: / (0 [1-9] | [12] [0-9] | 3 [01]) [- /. ] (0 [1-9] | 1 [012]) [- /.] (19 | 20) \ d \ d /, failureMessage: fMessage_val_validate_date_au) );");) if (field.hasClass ( 'validate-currency dollar-')) (var fMessage_val_validate_currency_dollar =' Please enter a valid $ amount. For example $ 100.00. ', Eval ( "if (field.getProperty (' title ')) (fMessage_val_validate_currency_dollar = field.getProperty (' title');}"); eval (" cfvalidate_ "+ field.getProperty ( 'name') + ". add (Validate.Format, (pattern: / ^ \ $? \ -? ([1-9] (1) [0-9] (0.2) (\, [0-9] (3) ) * (\. [0-9] (0.2 })?|[ 1-9] (1) \ d * (\. [0-9] (0.2)) | 0 (\. [ 0-9] (0.2 })?|( \. [0-9] (1,2 })?)$/, failureMessage: fMessage_val_validate_currency_dollar) );");) Validate.One_Required = function (elm, paramsObj ) (var paramsObj = paramsObj | | (); var message = paramsObj.failureMessage | | "Must Choose one"; var ready = false; var elm = paramsObj.elm; var p = elm.parentNode; var options = p.getElementsByTagName ( 'INPUT'); for (i = 0; 1) field.options [0]. selected = true; eval ( "if (field.getProperty ( 'title')) (fMessage_val_validate_one_required = field.getProperty ( 'title' );}") eval ( "var cfvalidate_" + field.getProperty ( 'name'). ('[]', replace'')+" = new LiveValidation (field, (validMessage: '', insertAfterWhatNode: field.parentNode });"); eval ( "cfvalidate_" + field.getProperty ( 'name'). ('[]', replace'')+". add (Validate.One_Required, (elm: field, failureMessage: fMessage_val_validate_one_required)) ");)))), $ ES ( 'select', $ ( 'ChronoContact_HomePage')). each (function (field) (eval (" var cfvalidate_ "+ field.getProperty ( 'name'). replace ( ' [] ','')+" = new LiveValidation (field, (validMessage:' '});"); if (field.hasClass (' validate-selection ')) (var fMessage_val_validate_selection =' Please make a selection '; if (field.size> 1) field.options [0]. selected = true; eval ( "if (field.getProperty ( 'title')) (fMessage_val_validate_selection = field.getProperty ( 'title');}"); eval ( "cfvalidate_" + field.getProperty ( 'name'). ('[]', replace'')+". add (Validate.Presence, (failureMessage: fMessage_val_validate_selection) );");))), $ ES ( 'textarea', $ ( 'ChronoContact_HomePage')). each (function (field) (eval ( "var cfvalidate_" + field.getProperty ( 'name'). ('[]', replace'')+" = new LiveValidation (field, (validMessage: '' });"); if (field.hasClass ( 'required')) (var fMessage_val_required = 'This field is required', eval ( "if (field.getProperty ( 'title')) fMessage_val_required = (field.getProperty ( 'title');}") eval ( "cfvalidate_" + field.getProperty (' name '). ('[]', replace'')+". add (Validate.Presence, ( failureMessage: fMessage_val_required) );");)));));



this problem you can see here:
http://www.tregima.it/
GreyHead 12 Apr, 2009
Hi riga75,

I suspect this may be because you have the Joomla email cloaking plugin turned on and it's trying to hide the example email in the validation warning message. Please try turning email cloaking off.

Bob
riga75 12 Apr, 2009

Hi riga75,
I suspect this may be because you have the Joomla email cloaking plugin turned on and it's trying to hide the example email in the validation warning message. Please try turning email cloaking off.
Bob




I disabled the plugin and the error message is gone .... sei un grande, grazie mille
For the other problem: I have rejected, but nothing has changed, give me a blank page (this one: http://www.tregima.it/index.php?option=com_chronocontact&task=send&chronoformname=Provapernewsletter) but not recording in the newsletter.
Aid recommendations?
Thank you again for the availability
Max_admin 13 Apr, 2009
Hi riga75,

Sorry but I can't understand where is the new problem right now, when do you get this blank page ?

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
GreyHead 13 Apr, 2009
Hi riga75,

That's completely normal.

If you want the page to show something add PHP+HTML in one of the OnSubmit Boxes.

Bob
riga75 15 Apr, 2009
Sorry bob, but I did not understand I have put in to the field
On Submit code - before sending email:
the following code:
<?php
    // Get the ChronoForms data
    $MyForm =& CFChronoForm::getInstance();

    // Get the base url
    $uri_base =& JURI::base();

    // Create a new url object
    $uri =& JURI::getInstance( $uri_base );

    // Set the parameters for the Acajoom subscription
    $params = array(
        'option' => 'com_acajoom',
        'act' => 'subscribe',
        'listid' => 14,
        'name' => JRequest::getVar('nome'),
        'email' => JRequest::getVar('email'),
        'receive_html' => 1,
        'redirectlink' => $MyForm->formparams->redirecturl
        );
    $query = $uri->buildQuery( $params );
    $uri->setQuery( $query );

    // Set the new ChronoForms ReDirect URL
    $MyForm->setFormData( "http://www.mysite.com", $uri->toString() );
    ?>


where mistake?
GreyHead 15 Apr, 2009
Hi riga75,

Ah, you are using a redirect to AcaJoom, so presumably the blank page is showing up after you leave acajoom. I thought that you could set a redirect for acajoom to go to a 'Thank you for subscribing' page?

Bob
riga75 15 Apr, 2009
Excuse my ignorance, but in your code was not present even the redirect?
and more specifically this piece of code?
  // Set the new ChronoForms ReDirect URL
    $MyForm->setFormData( "http://www.mysite.com", $uri->toString() );
    ?>
GreyHead 16 Apr, 2009
Hi riga75,

I'm kind of lost about what the problem we are dealing with now is??

Bob
riga75 16 Apr, 2009
The problem is that when you fill out the form and send me a blank page instead of me and the redirect does not record anything in the newsletter
Max_admin 16 Apr, 2009
Hi riga,

$MyForm->setFormData( "http://www.mysite.com", $uri->toString() );


should be:
$MyForm->setFormData( "redirecturl", $uri->toString() );


Cheers
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
riga75 16 Apr, 2009
Bob I found in another form where there is no address in the redirect that returns the blank page, then I think the code that you gave me is wrong because it does not redirect and not insert the data in the newsletter
riga75 16 Apr, 2009

Hi riga,

$MyForm->setFormData( "http://www.mysite.com", $uri->toString() );

should be:
$MyForm->setFormData( "redirecturl", $uri->toString() );

Cheers
Max



Ops scusa and then where I put the url address where the redirect should do?
Why not insert the data in the newsletter?
Max_admin 16 Apr, 2009
Hi riga,

using this code:
    <?php
        // Get the ChronoForms data
        $MyForm =& CFChronoForm::getInstance();

        // Get the base url
        $uri_base =& JURI::base();

        // Create a new url object
        $uri =& JURI::getInstance( $uri_base );

        // Set the parameters for the Acajoom subscription
        $params = array(
            'option' => 'com_acajoom',
            'act' => 'subscribe',
            'listid' => 14,
            'name' => JRequest::getVar('nome'),
            'email' => JRequest::getVar('email'),
            'receive_html' => 1,
            'redirectlink' => $MyForm->formparams->redirecturl
            );
        $query = $uri->buildQuery( $params );
        $uri->setQuery( $query );

        // Set the new ChronoForms ReDirect URL
        $MyForm->setFormData( "http://www.mysite.com", $uri->toString() );
        ?>
and fixing the line I posted inside the onsubmit before or after box, will redirect the form to the correct newsletter link!!

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Max_admin 20 Apr, 2009
Hi riga,

Sorry but I have been upgrading the site, please show me the code you have now to make sure everything is ok!

Cheers
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Max_admin 21 Apr, 2009
Hi riga,

please search for acajoom, I have answered/or seen a post this morning in which a user got it working using the CURL plugin for chronoforms!

Regards
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
andy 29 May, 2009
Hi,

This information is great. I've got a form that captures first name in {F_Name} and last name in {L_Name). Is there anyway to pass first and last name to Acajoom or to concatinate these two values?

Thank you,
Andy
Max_admin 01 Jun, 2009
Hi Andy,

Please search for posts has "acajoom" as the Author, the answer with how + images are there, its also at the Acajoom website somewhere, the link is in that post too!

Regards
Max
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.

VPS & Email Hosting 20% discount
hostinger