Hi all
I'm after some simple examples of how to display content based on answers in specific fields.
All I want to do is something simple like:
if ({data:BO_Q1}<> 'Yes')
echo "Question 1 is Marked as No or Unsure";
I can't seem to find any documentation on how the php variables are called, or in fact very much documentation on the php feature more broadly.
Any assistance to point me in the right direction would be gratefully received.
I'm after some simple examples of how to display content based on answers in specific fields.
All I want to do is something simple like:
if ({data:BO_Q1}<> 'Yes')
echo "Question 1 is Marked as No or Unsure";
I can't seem to find any documentation on how the php variables are called, or in fact very much documentation on the php feature more broadly.
Any assistance to point me in the right direction would be gratefully received.
in a PHP action:
but that would just show a text, if you want to render a View or a Message instead then enable the PHP action "Events behavior", and return an event name:
Now, add the "yes" event to the Events behavior then save the form, and add any actions you want to run in the "yes" event.
if($this->data("BO_Q1") == "Yes"){
echo "Question 1 is Marked as No or Unsure";
}
but that would just show a text, if you want to render a View or a Message instead then enable the PHP action "Events behavior", and return an event name:
if($this->data("BO_Q1") == "Yes"){
return "yes";
}
Now, add the "yes" event to the Events behavior then save the form, and add any actions you want to run in the "yes" event.
Thanks Max - that makes sense now.
You need to login to be able to post a reply.
