• 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: Conditional fields display in email

Conditional fields display in email 11 years 9 months ago #24427

  • Romuba
  • Romuba's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 15
I have set up a form with custom fields and they seem to be working fine but I cannot get the contents of the selection to display correctly in the email to the user.

I have a field called Are with the main geographical regions of a province displaying. When a region is selected another dropdown displays with the suburbs of that region for the user to select. This works well but In my email I have the heading Suburb and then for the display I have each of the suburbs as {City Bowl:value}{NorthernSuburbs:value}{Atlantic:value}{SouthernSuburbs:value}{SouthPeninsula:value}{CapeFlats:value}{WestCoast:value}

I expected only the suburbselected to display but instead all of these display. The region displays correctly as it only was one selection option. How can I get only the suburb selected to display and not all the suburb options?

Joomla 3.1 website - wpgibbonsplumbing.co.za/files/contact-details.html
RS Forms PRO
Ross Bartholomew
The administrator has disabled public write access.

Conditional fields display in email 11 years 8 months ago #24595

HI Romuba, how are you ?

i have the same issue did you find a solution to slove your problem ??
i m stuck with that since 3 hours..
when i recieved my email i got that

You have a new submission.

Name: nadji

Email: This e-mail address is being protected from spambots. You need JavaScript enabled to view it

{Subject:caption}: {Subject:value}

{Message:caption}: {Message:value}


i shoud have more value displayed...

thanks for your help man.

Lay
The administrator has disabled public write access.

Conditional fields display in email 11 years 8 months ago #24598

  • silviup
  • silviup's Avatar
  • OFFLINE
  • Moderator
  • Posts: 309
  • Thank you received: 49
Starting with RSForm!Pro rev. 46, we have added a special scripting language which will enable you to only display fields within the User, Admin & Additional Emails and Thank You Message. The syntax is as follows:

{if {placeholder:value}}this text gets displayed if the placeholder has a value{/if}

You will need to adapt this to your scenario, as in the following example:

{if {City Bowl:value}}{City Bowl:value}{/if}

This way, the placeholders of the fields that were not filled in on form submission will no longer be displayed within the email's text.

You can read more on this topic here:

www.rsjoomla.com/support/documentation/v...onfigure-emails.html
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
The administrator has disabled public write access.

Conditional fields display in email 11 years 6 months ago #25228

  • oorzaak
  • oorzaak's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 17
Hi,

It seems to me that this scripting works differently with checkboxes than with text fields. When using it on a text field, it works ok. But when using it on a checkbox, I do not get the results as expected.

I tried two types of script, one with a text and one with the value of the checkbox. Both render different results. Note: these are the names/values of individual checkboxes, not of checkbox groups.

With text:
{if {donderdagnamiddag:value}} Middagmaal {/if}

Renders no output in the mail at all when checked and submitted.

With value:
{if{vrijdagmiddag:value}} {vrijdagmiddag:value} {/if}

This renders in the mail as:
{ifmiddagmaal}middagmaal{/if}

Where 'middagmaal' is the value for the checkbox named 'vrijdagmiddag'.

I hope you can help me.

Joomla 2.5.14, RSForm Pro 1.4.0 R47

Kind regards,
Frits
The administrator has disabled public write access.

Conditional fields display in email 11 years 6 months ago #25287

  • oorzaak
  • oorzaak's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 17
My problem as described above is solved now:

After renewing my subscription I downloaded the latest RSFormsPro version (R48) and installed it. This solved the problem for most checkboxes, except - initially for this one:

{if{vrijdagmiddag:value}} {vrijdagmiddag:value} {/if}

So I started to look for the differences between this line and the other lines of code. I only found one difference:
in this line, the first four characters were '{if{' while on all other lines there was a space between 'if' and the following '{'. After inserting a space character in this line as well, this checkbox worked as expected.

I cannot judge if this type of 'strictness' in the scripting code is essential or if it would be ok to 'loosen' this a bit. Anyway I've told the folks at RSJoomla about this in a ticket so it's up to them to decide. In the meantime maybe someone can benefit from this topic.

Kind regards,
Frits


Edit: I got this reply from RSJoomla support:

Indeed the {if field requires a space before the field placeholder. Thank you for notifying us of this issue, we will try to take care of it in future revisions.
Last Edit: 11 years 6 months ago by oorzaak. Reason: Included reply from RSJoomla support
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!