Forums

Download link form

zadavanje 10 Feb, 2009
i am newbie and I did not use chronoforms before.
my problem is that I want to create for which visitor will fill in order to get program download link. i create form fields, but i don't know how to do next:
i have 5 programs given in list (radio buttons). idea is when visitor select one of programs, he gets mail with link eg.: http://www.domen.com/downloads/file1.exe for selection of first radio button, http://www.domen.com/downloads/file2.exe for second radio button,...
what I need to do? is there simple way (code) which I can put in email template?
thanks.
GreyHead 10 Feb, 2009
Hi zadavanje,

You will need to edit your email template to do this. Use some code like:
<?php
$check_1 = JRequest::getString('check_1', '', 'post');
if ( $check_1 != '' ) {
    echo "Your link is <a href='http://www.domen.com/downloads/file1.exe'>here</a><br />";
}
. . .
?>

Bob
zadavanje 11 Feb, 2009
Thanks, but...
I cannot put that into email template (HTML), because if I do that "<?php" part was removeed I get next in template preview:

Your download link is:

$check_1 = JRequest::getString('check_1', '', 'post');
if ( $check_1 != '' ) {
echo "Your link is here
";
}
?>


Igor
GreyHead 11 Feb, 2009
Hi zadavanje,

Turn OFF 'Use HTML Editor' in the Email setup, then you can use PHP in the template.

Bob
This topic is locked and no more replies can be posted.