Performing Calculations

December 10, 2018 02:59:20
jstraete
Topics: 34
Messages: 111
Is there any syntax to perform calculations with the data? For instance, if I have a Formidable Form with a field ID [100] which contains a number, is there a way to insert into the PDF something like [100]*.02 to return the value of whatever [100]*.02 equals?
December 10, 2018 06:33:20
E2Pdf
Topics: 7
Messages: 3614
Support
Hi,

Unfortunately there is no direct support for calculations in E2Pdf at this moment. We have this point in our TODO list, so this feature will be released in future.

At this moment you can check Formidable Forms Field Calculation.

We remain at your service.

We would really appreciate your feedback at WordPress.org!
December 10, 2018 17:11:39
jstraete
Topics: 34
Messages: 111
Ok no problem. I can use Formidable Forms field calculations, I was just trying to prevent adding another field to my form for the sole purpose of doing a calculation for the PDF.

Is there any syntax for doing if statements? I know I can use Actions to show/hide content, but I have a few text and text area fields where I would like to do something like this:
[100] = Make / Model Sold
[101] = Sell Description
[102] = Sell Price

Text area field =
[100:1]
[101:1]
Sell Price: $[102:1]

[100:2]
[101:2]
Sell Price: $[102:2]

I have all this information in the same text area field, because the length of the Sell Description can vary in length (may take up only one line, may take up 10 lines), so if I have them in the same text area field, the 2nd unit will always be placed directly below the first unit. However, there are times where there may only be 1 unit sold, in which case [100:2], [101:2], and [102:2] would all be blank, which is fine, but I would also want the text "Sell Price: $" to be blank in that instance also. So is there any syntax to add something to it like this to it so it will be blank in that scenario:

[if 102:2 != ""]Sell Price: $[/if 102:2][102:2]
December 10, 2018 17:53:55
E2Pdf
Topics: 7
Messages: 3614
Support
Unfortunately Formidable Forms do not offer Conditional Logic for separated Repeatable entries by default so such syntax will not work but you can try to use our "Actions" and "Conditions" to change dynamically output value:

The logic will look like:
If 100:1 != "" and 100:2 == "" we output one "Value".
If 100:1 != "" and 100:2 != "" and 100:3 == "" we output another "Value".

I attached screenshot with example from which it must be clear how to use it.

We remain at your service.

We would really appreciate your feedback at WordPress.org!
December 10, 2018 18:16:12
jstraete
Topics: 34
Messages: 111
Ok yeah that's fine I can do it that way, I just got room on my template for potentially a dozen different entries from a repeatable field, so the Action statement is just going to be very big. Not a big deal that kind of syntax isn't possible, I just wanted to verify before starting in on a long Action statement. Thanks!
Get News and Updates
Our monthly newsletter keeps you in the loop, so you'll always be up to date with the latest news and updates about E2Pdf.
* You can update your email subscription preferences here.
All trademarks, service marks, trade names, product names, and logos appearing on this website are the property of their respective owners. The use of trademarks such as Formidable Forms®, Forminator Forms®, Gravity Forms®, JetFormBuilder®, WordPress®, WooCommerce®, WPForms® and others is solely for identification purposes (nominative use) and does not imply any affiliation, sponsorship, or endorsement by the respective trademark holders.
© 2017 - 2026, https://e2pdf.com

We use cookies to collect and analyse information on site performance and usage, to provide social media features and to enhance and customise content and advertisements. By clicking "Accept Selected", you consent to use of selected cookies according to our Cookie Policy.