Hi @julien66
The “code” element wouldn’t let you use PHP anyway, regardless whether you can access fields values. It’s just a HTML tag to let you display code on page…
But I think there is a way and it’s similar to the 1st solution that Kris suggested.
I’m assuming that “computes either calculation field A or calculation B depending on what the user chooses for an initial radio button” means that:
– you have two “calculations” type fields in form
– and depending on radio button choice only one of them is shown (regardless of whatever they calculate)
– so that’s based on “Visibility” conditions and both calculations are giving different results
Is that about right?
If yes, you can do this:
– put the third calculations field on form (let’s say it’s {calculation-3})
– optionally set it to be hidden
– assuming that your “Calculation A” and “Calculation B” are, accordingly, fields “{calculation-1}” and “{calculation-2}”, put this formula in {calculation-3} field:
{calculation-1}+{calculation-2}
– in your “Inline Message” simply use {calculation-3} in text where you want to display the value.
I’ve created a basic example form for you to demonstrate such approach:
https://pastebin.com/CcHF29qu
Best regards,
Adam