Hi,
Can you give me a guide how to inegrate the file in my Newsletter-Form?
Please =)
Can you give me a guide how to inegrate the file in my Newsletter-Form?
Please =)
Hi t.stewen,
>> I've moved this post into a new thread as it didn't seem to link to the prevoius one.
What file? into what form? Please tell us some more.
If you want a file upload field then you can add this in the Form HTML?
Bob
>> I've moved this post into a new thread as it didn't seem to link to the prevoius one.
What file? into what form? Please tell us some more.
If you want a file upload field then you can add this in the Form HTML?
Bob
Ok,
I want to explain what i want...
I need a Newsletter-Form but the Form is only there to collect the Data from the Users so i dont need a Newsletter-Comp.
For an legally Newsletter I need a "double-opt-in" (you send the Form and get an email with a "activation"-Link like "klick here to validate your email-adress").
So i need a unique generated link for each user in the email and save the klick in the database.
I hobe you understand me and thanks for help =)
I want to explain what i want...
I need a Newsletter-Form but the Form is only there to collect the Data from the Users so i dont need a Newsletter-Comp.
For an legally Newsletter I need a "double-opt-in" (you send the Form and get an email with a "activation"-Link like "klick here to validate your email-adress").
So i need a unique generated link for each user in the email and save the klick in the database.
I hobe you understand me and thanks for help =)
Hi t.stewen,
Yes you can do this. Create your form with the email field, a hidden field with the name 'token' and no value, and a submit button; create a database table and save it. In the OnSubmit before box generate a random token. Create an email and include a link in it using the random token and include the &task=send option.
Either use the same form with some PHP to recognise whether this is a validation or a form submission OR use a second form to cature the reply and update the database.
That's a very sketchy reply - is it enough?
Bob
Yes you can do this. Create your form with the email field, a hidden field with the name 'token' and no value, and a submit button; create a database table and save it. In the OnSubmit before box generate a random token. Create an email and include a link in it using the random token and include the &task=send option.
Either use the same form with some PHP to recognise whether this is a validation or a form submission OR use a second form to cature the reply and update the database.
That's a very sketchy reply - is it enough?
Bob
Tanks...
I need a little bit more information about the email-part... (my php knowledge is enough)...
Step by Step reply:
1) create Form width hidden field
2) befor submit: update hidden field width php (insert unique code)
3) Create E-Mail -> Here i need more input😉
4) Create a Form width check the code and update the Database (when correct, send the Data per mail) -> here i need some more input too
My questins:
How can i update the E-Mail with the generated Code?
How can i get the Userdata from the first form (name, street etc) for step 4 to send the whole data per mail?
Tanks Tobias
I need a little bit more information about the email-part... (my php knowledge is enough)...
Step by Step reply:
1) create Form width hidden field
2) befor submit: update hidden field width php (insert unique code)
3) Create E-Mail -> Here i need more input😉
4) Create a Form width check the code and update the Database (when correct, send the Data per mail) -> here i need some more input too
My questins:
How can i update the E-Mail with the generated Code?
How can i get the Userdata from the first form (name, street etc) for step 4 to send the whole data per mail?
Tanks Tobias
Hi t.stewen,
I don't understand your question about street addresses - do you want to use snail-mail? You cna add extra fields to the form if you do.
Bob
How can i update the E-Mail with the generated Code?
In the form HTM include a hidden field<input type='hidden' name='code' value='' />
In the Email template you can set the value of the code<?php
$code = // some code to create a unique token
JRequest::setVar('code', $code, 'post');
$url = "http://mydomain.com/index.php?option=com_chronocontacr&chronoformname=my_form&task=send";
$url .= "&code=$code";
?>
// Some html for your email
<p>Please click this link to validate <a href="<?php echo $url; ?>">Click Here</a></p>
I don't understand your question about street addresses - do you want to use snail-mail? You cna add extra fields to the form if you do.
Bob
Tanks Bob you're great =)
I don't know that i can use php in the mail-templates... ok so this is easy =)
i explain the second part:
in the first form you fill out the name, the firstname, the email and some checkboxes (interessts categorys).
now you can't use these userdata because double-opt-in left. so i dont want these userdata per mail.
now you get the link width the code and click on it (another form with an code field). On submit the double-opt-in is correct and i can send the newsletter to this user.
On this position i want an mail width the data from the first form (name, the firstname, the email and some checkboxes).
I hope you understand me =)
I don't know that i can use php in the mail-templates... ok so this is easy =)
i explain the second part:
in the first form you fill out the name, the firstname, the email and some checkboxes (interessts categorys).
now you can't use these userdata because double-opt-in left. so i dont want these userdata per mail.
now you get the link width the code and click on it (another form with an code field). On submit the double-opt-in is correct and i can send the newsletter to this user.
On this position i want an mail width the data from the first form (name, the firstname, the email and some checkboxes).
I hope you understand me =)
Hi t.stewen,
OK. I'd probably do this with one form. Have the form gather all the info and save it to the database table.
In the OnSubmit after use a PHP 'if' to give you two different routes.
Bob
OK. I'd probably do this with one form. Have the form gather all the info and save it to the database table.
In the OnSubmit after use a PHP 'if' to give you two different routes.
<?php
$code = JRequest('code', '', 'get);
if ($code) {
// this is the result of a validation email
// search in the database to get this users info
// create an email and send it
// disable the standard email
} else {
// this is an initial form submission
// send the standard email
}
?>
Bob
Hi Tanks,
Disable it in the Email properties box!
Regards
Max
Disable it in the Email properties box!
Regards
Max
Ah..
so i must send the mail with php... ok =)
(first i think that i can send the mail over chronoforms and can disable it there only for the second part)
great work =)
big thx
so i must send the mail with php... ok =)
(first i think that i can send the mail over chronoforms and can disable it there only for the second part)
great work =)
big thx
Hi t.stewen,
Well that's the official answer, the unofficial one is
Bob
Well that's the official answer, the unofficial one is
<?php
$rows[0]->emailresults = 0;
?>
You could probably switch between emails too - but I haven't worked out how to do that yet.Bob
Hi,
i have a problem with the Db-Connect for the code:
widthout the DBconnection it works fine...
please help me =)
(the code is in the "On Submit code - before sending email:" field)
i have a problem with the Db-Connect for the code:
$db = JFactory::getDBO();
while($unique == false){
$password = passwortgenerator(20);
$query = "SELECT code FROM #__chronoforms_Newsletter WHERE code='".$password."'";
$db::query($query);
if($db::getNumRows() < 1){
$unique = true;
}
}
$link = "http://www.mywebspace.de/test.php?code=".$password;
widthout the DBconnection it works fine...
please help me =)
(the code is in the "On Submit code - before sending email:" field)
Hi t.stewen,
A few small changes
Bob
A few small changes
$db =& JFactory::getDBO();
while($unique == false) {
$password = passwortgenerator(20);
$query = "SELECT code FROM #__chronoforms_Newsletter WHERE code='".$password."';";
$db->query($query);
if ( $db->getNumRows() < 1){
$unique = true;
}
}
$link = "http://www.mywebspace.de/test.php?code=".$password;
Bob
Hi,
i have another problem now..
when i send an mail php i have problems with charakters like öäüÖÄÜ€?
When they come from Crono, all works fine..?
Why?
EDIT:
i have stil problems with the databasepart... when i delete this part, the system send me an email but not when it is inserted?! Why?
i have another problem now..
when i send an mail php i have problems with charakters like öäüÖÄÜ€?
When they come from Crono, all works fine..?
Why?
EDIT:
i have stil problems with the databasepart... when i delete this part, the system send me an email but not when it is inserted?! Why?
this line :
$password = passwortgenerator(20);
is the function passwortgenerator is defined somewhere ? the function name is correct ?
Yes... but i found the error!
but i don't know why?! now i put the code (copy and past) in the "after sending email"-field and it works with this small changed code
but not in the "before sending email"-field...
The problem with the charakters is still there
but i don't know why?! now i put the code (copy and past) in the "after sending email"-field and it works with this small changed code
$password = "";
while($password == ""){
$temp_password = passwortgenerator(20);
$db = JFactory::getDBO();
$db->setQuery("SELECT code FROM jos_chronoforms_Newsletter WHERE code='".$temp_password."';");
if(count($db->loadObjectList()) < 1){
$password = $temp_password;
}
}
JRequest::setVar('code', $password);
but not in the "before sending email"-field...
The problem with the charakters is still there
This topic is locked and no more replies can be posted.