The bare
tag simplifies the HTML output generated by content in blocks and conditioned text
widgets.
setlist: DCM_ROWS
1. Mode {{Q: model}} {{EXP: <p>The following....</p>}}
2. Storage Capacity {{Q: storage}} {{EXP: <p>Storage ....</p>}}
3. Battery Life {{Q: battery}} {{EXP: <p>A common measure ...</p>}}
block: <<BLOCK
settext: DCM_ROW_%%ID%%
text: %%TEXT%%
explain: <b>Feature Description: %%TEXT%%</b><br /><br /> %%EXP%%
dialog: y
BLOCK
inline: y
bare: y
list: DCM_ROWS
Details
- To use
bare
with blocks, includebare: y
on the block definition (along with the requiredinline
tag). - To use
bare
withset conditioned text
orshow conditioned text
, includebare: y
as a tag. - The
bare
tag can be useful when the default HTML affects the survey layout, particularly with thecell
tag or custom scripts. - A regular inline block (without
bare
) wraps all its free text content within an outer<div>
element, in addition to the<div>
elements generated by each iteration of the block. A bare block, on the other hand, simplifies the HTML output by wrapping each freetext iteration with a<div class>
and removing outer<div>
elements.
Additional examples
Comparing a 'set conditioned text' with and without 'bare: y'
One common use of bare
is to eliminate unwanted line breaks caused by <div>
elements. Here, the set conditioned text
'TIME' is being placed within a show text
widget. The text that should be displayed in lieu of '__TIME__' is being pushed to the next line. This is an undesirable effect that is not intended or wanted.
No 'bare: y' applied
set conditioned text: TIME
1. 20 {if anyChecked($panel,182,256)}
2. 15 {if anyChecked($panel,99)}
3. 15 {if anyChecked($panel,991)}
show text: PREAMBLE
text:<<END
<p>Thank you for taking time to share your experience with us! This survey should take about __TIME__ minutes to complete.</p>
END
With 'bare: y' applied
Here, we add the bare
tag to the set conditioned text
. Now, the line does not have the unexpected break.
set conditioned text: TIME
bare: y
1. 20 {if anyChecked($panel,182,256)}
2. 15 {if anyChecked($panel,99)}
3. 15 {if anyChecked($panel,991)}
show text: PREAMBLE
text:<<END
<p>Thank you for taking time to share your experience with us! This survey should take about __TIME__ minutes to complete.</p>
END
Comments
0 comments
Please sign in to leave a comment.