Reputation: 1
In an OpenTBS situation, I'm trying to use conditional blocks to check against each individual option/answer that a user selects in a checkbox field in a form whose data is being used to insert the conditional content.
I've asked you about this previously, here Can a 'when' conditional section show content based on a 'contains' or 'includes' parameter? , and you kindly gave me a suggested solution.
Unfortunately my developers could not get it working. I wonder if there's another way. For example, can one target a specific checkbox option in a checkbox field to query whether it is checked or unchecked, using a conditional block?
Let's say I have this checkbox field in my form:
Select the kinds of personal information you collect
Is it possible to target each choice individually with a conditional block, to check whether it has been checked/selected or not, e.g., along these lines:
[onshow;block=begin;enlarge=tbs:p;when [var.Select the kinds of personal information you collect_Name]=!'']
Name
[onshow;block=end;enlarge=tbs:p]
If this is possible, I could insert conditional content per selected option, regardless of whether other options are also selected.
Any help much appreciated. Thanks very much.
Richard
Upvotes: 0
Views: 180
Reputation: 5552
It it possible and simple to use conditional blocks on paragraphs.
Here is 3 comments about your snippet :
block=begin
and block=end
in a DOCX (or other XML based documents) because we are note sure they are placed in symmetric positions relatively to the to the inner XML. It's true you are also using parameter enlarge
, but there is much more simple (see below).when
string expression against quotes, using strconv=esc
.So a simple solution could be:
PHP :
global $collect_name, $collect_adress, $collect_phone;
$collect_name = ...;
$collect_adress= ...;
$collect_phone= ...;
DOCX :
Upvotes: 0