• 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: Show only values ​​that were chosen conditional on

Show only values ​​that were chosen conditional on 11 years 7 months ago #24960

  • linhos
  • linhos's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
Hello team RSJoomla forum, I'm using rsform and conditional fields, until there all right, however when the ADMIN receive emails fields that were not chosen will also appear in the body of the email in the values​​, it is possible to show only the fields that were chosen in the drop-down? Appears necessary that only the fields of the values ​​that were chosen, not all fields in the e-mail administrator. thank you

Here is the link to the model so that they can see better

conselheiroautomotivo.com.br/onix/index....=com_rsform&formId=3
The administrator has disabled public write access.

Show only values ​​that were chosen conditional on 11 years 7 months ago #24962

Hello linhos,

In order to achieve this, you will need to place a Script in the Form's Script Called on Form Process area (Components > RSForm!Pro > Manage Forms > edit the form > Properties > PHP Scripts > second text area), which will hide the dropdown fields which were not chosen.

Before placing the script you will also have to add a "Make a selection" item in your dropdown which will act as a flag, signaling the script that the dropdown selection was not changed by the user.

For the script, you can use something like the following:
if($_POST['for']['Field1'][0] == 'Make a selection')
   $_POST['form']['Field1'][0] = '';
 
if($_POST['form']['Field2'][0] == 'Make a selection')
   $_POST['form']['Field2'][0] = '';
... etc.

PS: Please remember to adjust the script to your specific scenario.
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.
The following user(s) said Thank You: fyistudio

Show only values ​​that were chosen conditional on 11 years 7 months ago #25186

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

This solution is really working fine for me, thanks for sharing. Yet I'd like to point out that there is a typo in the first line of each pair of code lines:
if($_POST['for']['Field1'][0] == 'Make a selection')

should be:
if($_POST['form']['Field1'][0] == 'Make a selection')

So it should be 'form' instead of 'for'.


Kind regards,
Frits
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!