Hello,
I would like to insert different download links into my thank you message depending on the choices in my checkbox group.
Is this possible, and what would be the easiest way for a PHP noob?
Thank you in advance,
Tiko.
I would like to insert different download links into my thank you message depending on the choices in my checkbox group.
Is this possible, and what would be the easiest way for a PHP noob?
Thank you in advance,
Tiko.
Hi Tiko,
It's certainly possible and a PHP Switch statement is probably the simplest way to do it.
Bob
It's certainly possible and a PHP Switch statement is probably the simplest way to do it.
Bob
ok, I'll google PHP switch statement and if can't sort it out on my own I'll be back. Thank you for your patience.
Tiko.
Tiko.
ok, I looked around a bit. Should I put the switch statement directly into the thank you message code box? And as value I use the field name of the checkbocgroup? And as cases the values of the checkbox group?
So this is the code I put in my thank you message:
But in the thank you message it displays: Dossier de \L'arbre à T"; case "essenciel": echo "Dossier de L'essenciel"; case "blind_date": echo "Dossier de Blind Date"; case "hybride": echo "Dossier de Hybride"; case "incubes": echo "Dossier de Les Incubés"; break; } ?>
So, what do I do wrong?
<?php
switch ($dossiers_spectacles) {
case "arbre_a_t":
echo "<a href=\'http://www.reve2.com/MyJoomla/joomla_docs/dossier_arbre_a_t.pdf\' target=\'_blank\'>Dossier de \L'arbre à T</a>";
case "essenciel":
echo "<a href=\'http://www.reve2.com/MyJoomla/joomla_docs/dossier_essenciel_19_09_2013.pdf\' target=\'_blank\'>Dossier de L'essenciel</a>";
case "blind_date":
echo "<a href=\'http://www.reve2.com/MyJoomla/joomla_docs/dossier_essenciel_19_09_2013.pdf\' target=\'_blank\'>Dossier de Blind Date</a>";
case "hybride":
echo "<a href=\'http://www.reve2.com/MyJoomla/joomla_docs/dossier_essenciel_19_09_2013.pdf\' target=\'_blank\'>Dossier de Hybride</a>";
case "incubes":
echo "<a href=\'http://www.reve2.com/MyJoomla/joomla_docs/dossier_essenciel_19_09_2013.pdf\' target=\'_blank\'>Dossier de Les Incubés</a>";
break;
}
?>
But in the thank you message it displays: Dossier de \L'arbre à T"; case "essenciel": echo "Dossier de L'essenciel"; case "blind_date": echo "Dossier de Blind Date"; case "hybride": echo "Dossier de Hybride"; case "incubes": echo "Dossier de Les Incubés"; break; } ?>
So, what do I do wrong?
Hi Tiko,
The Thank You Page action doesn't support PHP (not sure why). Please copy and paste the same code into a Custom Code action and then test again.
Bob
The Thank You Page action doesn't support PHP (not sure why). Please copy and paste the same code into a Custom Code action and then test again.
Bob
This topic is locked and no more replies can be posted.