Forums

Show Thanks Message with option..

potyno 20 Feb, 2013
sto diventando matto da ore...

in chronoform se metto la spunta su un campo del form che si chiama 'emissionetessera' nella visualizzazione del "Show Thanks Message" devo poter eseguire un codice html se il campo è spuntato o un altro codice se il campo non è spuntato.
Ovvero si tratta del codice html per creare il pulsante per il link ad un sito.

Come posso fare ?
Premetto che non sono un programmatore....

/// Google translation ///
I'm going crazy for hours ...

in chronoform if I put the check mark on a form field called 'emissionetessera' in the display of the "Show Thanks Message" I can run a html code if the field is checked or another code if the field is not checked.
That this is the html code to create the button to link to a site.

How can I do?
I state that I am not a programmer ....
potyno 20 Feb, 2013
I forgot the translation ...
I'm going crazy for hours ...

in chronoform if I put the check mark on a form field called 'emissionetessera' in the display of the "Show Thanks Message" I can run a command html instead of another if the field is checked or not checked, how can I do?
GreyHead 20 Feb, 2013
Hi potyno,

You can use a Custom Code action before the Show Thanks Message action to set a value:
<?php
if ( isset($form->data['emissionetessera'] ) && $form->data['emissionetessera'] ) {
  $form->data['thanks_page'] = "
// add one set of HTML here 
  ";
} else {
  $form->data['thanks_page'] = "
// add another set of HTML here 
  ";
} 
?>
Then use {thanks_page} in the Show Thanks page action itself.

Note: you need to be careful with any quotes in the HTML doing this.

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

VPS & Email Hosting 20% discount
hostinger