Hi all,
Is it possible to have a condition in HTML?
I have 2 images that would like to put in an HTML in VP, but only display one if condition IS DEFINED.
Hope this makes sense. Thank you
Condition in html
Re: Condition in html
Yes it is.
In BO forms use the SHOW Action.
Example:
From the User Guide:
You can also conditionally include the entire sections of a document template into the final document. To define a condition of section inclusion, add the condition followed by the action “SHOW SECTION_START”. This also marks the start of the section. To mark the end of the section include, the following tag: <<SECTION_END>>. For example,
<<IF Account.Balance > 1000 THEN SHOW SECTION_START>>
The text of the section follows …
<<SECTION_END>
The rest of the text follows
In BO forms use the SHOW Action.
Example:
Code: Select all
<<IF MyBo.IsField='Option 1' THEN SHOW SECTION_START>>
<img alt="Pic1" src="<<MyBO.Pic1>>" width="400" height="150">
<<SECTION_END>>
Code: Select all
<<IF MyBo.IsField='Option 2' THEN SHOW SECTION_START>>
<img alt="Pic1" src="<<MyBO.Pic2>>" width="400" height="150">
<<SECTION_END>>
You can also conditionally include the entire sections of a document template into the final document. To define a condition of section inclusion, add the condition followed by the action “SHOW SECTION_START”. This also marks the start of the section. To mark the end of the section include, the following tag: <<SECTION_END>>. For example,
<<IF Account.Balance > 1000 THEN SHOW SECTION_START>>
The text of the section follows …
<<SECTION_END>
The rest of the text follows