• 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: RSform Pro PDF Plugin Conditional Fields

RSform Pro PDF Plugin Conditional Fields 11 years 3 months ago #26182

I have set a conditional fields inside the form, Now when the pdf is generated. I want the conditional fields to take effect also in the PDF.

for example, If "are you married" is yes, show "Spouse Name" In the form
In the PDF it will not show the "Spouse Name" if the "are you married" is no.

Thanks for the help.
The administrator has disabled public write access.

RSform Pro PDF Plugin Conditional Fields 11 years 3 months ago #26188

  • adrianp
  • adrianp's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 631
  • Thank you received: 146
Hello,

RSForm!Pro provides a PHP scripting area for the generated PDF, this is useful to control the information however you desire:

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

In case you need to reset the selection made in a conditional field, examples can be found here:

www.rsjoomla.com/support/documentation/v...nditional-field.html
This is not official customer support. To receive your support, submit a support ticket here.
The administrator has disabled public write access.

RSform Pro PDF Plugin Conditional Fields 11 years 3 months ago #26204

Thanks,
but here's what I did.

I copied the codes directly from the link you gave me.
and here's the result.

<?php

$ph='{surname_partner:value}';
$value_key=array_search($ph,$args);

if ($args[$value_key]=='')
$info->useremail_layout = str_replace($ph,'',$info->useremail_layout);

?>

but still "surname_partner" is showing up in the PDF. Sorry im new to this.
can you give me a hint on what exactly will I do to hide the textbox "surname_partner" if there is no values input by the user?

Much appreciated.
The administrator has disabled public write access.

RSform Pro PDF Plugin Conditional Fields 11 years 3 months ago #26211

  • djseleco
  • djseleco's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 47
  • Thank you received: 10
Hi you can try to use this code:
$pos1 = array_search('{surname_partner:value}',$args['placeholders']);
if($args['values'][$pos1] == '') {
    $info->useremail_layout = str_replace('{surname_partner:caption}','',$info->useremail_layout);
}

without <?php ?> tag
Last Edit: 11 years 3 months ago by djseleco.
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!