As a title I ask if and how it is possible to use different layouts of tcpdf depending on the value of a field. Field that also guides the following fields. Sorry if perhaps it can be trivial but I have to merge two forms with different layouts in the same form with outputs on different tcpdf.
Thank you in advance.
Thank you in advance.
Hi sanma,
Yes I think so but you would need to build the content (or parts of it) using a PHP action before the TCPDF action, save the content as a form variable and then include that in the TCPDF. Or if there are major differences you could use an Event Switcher and two different TCPDF actions.
Bob
Yes I think so but you would need to build the content (or parts of it) using a PHP action before the TCPDF action, save the content as a form variable and then include that in the TCPDF. Or if there are major differences you could use an Event Switcher and two different TCPDF actions.
Bob
The two pdf are completely different and have different fields in their input. I'd like to try using the event switcher commanded by the first dropdown list of the form. It's possible? If you could you give me a simple example?
Thank you very much
Thank you very much
I tried a small example to understand how it works, with a dropdown list called dropdown1 with values Yes and No and the submit button.
In the event switcher I put the following code:
<? Php
if ($ form-> data ['dropdown1'] == 'Yes') {
return 'Yes';
} else {
return 'No';
}
?>
In Yes, I put a "display message" field, in no another "display message".
It does not show me any message .....
🙄
Hi sanma,
The code looks OK - there are some extra spaces but they may have been added in copying and posting to the forum here.
Please drag a Debugger action into the On Submit event after your event switcher, then submit the form and post the debug - including the 'dummy emails' results here.
Bob
The code looks OK - there are some extra spaces but they may have been added in copying and posting to the forum here.
Please drag a Debugger action into the On Submit event after your event switcher, then submit the form and post the debug - including the 'dummy emails' results here.
Bob
Hi GreyHead.
Excuse me but also the debugger does not give any results. I do something wrong but I do not know what. 😶
My form is designed like this:
In Designer

In Setup

I don't see any message coming from the fields "Display Message" and any message from the debugger.
Excuse me but also the debugger does not give any results. I do something wrong but I do not know what. 😶
My form is designed like this:
In Designer

In Setup

I don't see any message coming from the fields "Display Message" and any message from the debugger.
Unfortunately, the form is on an intranet that is not accessible from the outside. I delete the form and create it again, let's see if I can understand what happens.
Is there an example that I can follow step by step?
Is there an example that I can follow step by step?
Sanma were your dropdown values ACTUALLY "Yes"/"No" or were they just the LABELS? I think you'll find your values will be either yes/no or more likely 1/0
Hi All,
healyhatman hit the problem....
In php I passed as data yes / no and not 1/0 .🙄
I could understand it myself!!!!!
If the dropdown1 cases are more than 2 can I use the case in the event switcher php?
Can you give me an example?
Thank you again
healyhatman hit the problem....
In php I passed as data yes / no and not 1/0 .🙄
I could understand it myself!!!!!
If the dropdown1 cases are more than 2 can I use the case in the event switcher php?
Can you give me an example?
Thank you again
This topic is locked and no more replies can be posted.