• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Display text based on radio button submission

Display text based on radio button submission 11 years 8 months ago #24607

  • perini-ps
  • perini-ps's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 18
  • Thank you received: 1
Hi all,

I'm trying to do something which I thought was going to be simple...

I am attempting to use RS Form Pro for this type of question:

Did you find this page helpful?
Yes
No


... and some text is displayed which depends on the user's response.

I had first assumed that I could do this with radio buttons and no Submit button, but of course that doesn't work, as Submit needs to... well... submit. So, I then used two buttons and didn't get far with that. So, my approach is now to use radio buttons and Submit. All good so far.

So, with what I want to do, the new "if" statement is ideal:

www.rsjoomla.com/support/documentation/v...-scripts-syntax.html

and here's my test "thank you" message, using form component "dtq1":

<p>Thank you for your submission.</p>
<p>{if {dtq1:Yes}}You said Yes{/if}</p>
<p>{if {dtq1:No}}You said No{/if}</p>

but...

I can't get it to work. I only see "Thank you for your submission."

What am I missing?

Cheers,
Paul
The administrator has disabled public write access.

Display text based on radio button submission 11 years 8 months ago #24613

  • upbm
  • upbm's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 34
  • Thank you received: 4
Hello,

You make a mistake in the use of placeholders, look at the basic documentation, if you want to display the contents of dtq1 field just use the placeholder {dtq1: value} in the text of the mail or thank you message, it will display Yes or No according to what has been checked, no need anything else !

Have a good day.
Didier
Last Edit: 11 years 8 months ago by upbm.
The administrator has disabled public write access.

Display text based on radio button submission 11 years 8 months ago #24624

  • perini-ps
  • perini-ps's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 18
  • Thank you received: 1
Hi Didier,

Many thanks for your response. However, I don't want to display the value of dtq1, I want to display a piece of text based on how the user responds to dtq1.

So, if the user clicks "Yes" to dtq1, I want to display a different piece of text to if the user clicks "No".

Is that possible...?

Cheers,
Paul
The administrator has disabled public write access.

Display text based on radio button submission 11 years 8 months ago #24645

Please keep in mind that the new "if" statement is pretty limited at the moment, for example checks like if(radio has value yes) are not possible with this feature.

The only thing you can use the if statement for, is to check if a field contains a value. In your case you can only use it for something like the following:

{if {dtq1:value}}You have selected either Yes or No{/if}
Please remember that my responses aren't considered customer support, to receive customer support please submit a new customer support ticket, and we will gladly assist you.

Best Regards,
Cristian Nicolae.
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!