Forums

showing thank you message on contentpage

jos 15 Apr, 2008
Using the mambot it is posible to show the form on a contentpage of joomla. Is it posible to remove the form after it is submitted and show a thankyou message on that contentpage?
Max_admin 16 Apr, 2008
Hi Jos,

Yes you can, at the redirect URL, add the content item link and end it with something like : &thanks=1, now at the top of your form code, make a PHP if statement check, if ($_GET['thanks'] == 1), show the thanks message, else, show the form!!🙂

Cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
jos 16 Apr, 2008
Thanx Max,

That was so easy, I should of thought about that.

Jos.
thoomas 28 Apr, 2008
hello,

but I can't get it working. Does not show "thanks" message. Code is following:
<?php if ($_POST['thanks'] == 1); ?>
<table style="text-align: left; width: 441px; height: 302px;"
 border="0" cellpadding="1" cellspacing="1">
  <tbody>
    <tr>
      <td width="115">Nimi:</td>
      <td width="319"><input name="name" value="<?php echo $_POST['name']; ?>" type="text"></td>
    </tr>
    <tr>
      <td>E-mail:</td>
      <td><input name="email" value="<?php echo $_POST['email']; ?>"
 type="text"></td>
    </tr>
    <tr>
      <td>Teade:</td>
      <td><textarea cols="20" rows="5"
 name="teade"><?php echo $_POST['teade']; ?></textarea></td>
    </tr>
    <tr>
      <td>Soovin infot:</td>
      <td></td>
    </tr>
    <tr>
      <td style="text-align: right;"><input
 name="tyybid[]" value="Kaarkatused" <?php if($_POST['tyybid'] == 'Kaarkatused')echo' checked '; ?> type="checkbox"></td>
      <td>Kaarkatuste kohta</td>
    </tr>
    <tr>
      <td style="text-align: right;"><input
 name="tyybid[]" value="Viilkatused" <?php if($_POST['tyybid'] == 'Viilkatused')echo' checked '; ?>  type="checkbox"></td>
      <td>Viilkatuste kohta</td>
    </tr>
    <tr>
      <td style="text-align: right;"><input
 name="tyybid[]" value="Lamekatused" <?php if($_POST['tyybid'] == 'Lamekatused')echo' checked '; ?> type="checkbox"></td>
      <td>Lamekatuste kohta</td>
    </tr>
    <tr>
      <td>Sisesta turvakood: </td>
      <td>{imageverification}</td>
    </tr>
  </tbody>
</table>
 <br>
 <input name="submit" value="Saada"
 type="submit">

What might be wrong here?
jos 28 Apr, 2008
Hi Thoomas,

The code should be someting like this:

<?php if ($_GET['thanks'] == 1)
{
?>
Put your thank you message here
<?php
}
else
{
?>
Put your form here
<table>
...
</table>
<?php
}
?>


Greetinx,

Jos de Bruijn.
thoomas 28 Apr, 2008
Hi, Jos!

Thanks! It works like a charm;)

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

VPS & Email Hosting 20% discount
hostinger