Jump to content
You're invited! Join our 4.6 Live Event on ZOOM 6/24 ×

Community

Syntax re IF Statements


Wayne B
 Share

Recommended Posts

Can someone assist with the correct syntax to display the correct coloured background based on Status of a particular issue in Pages in a 'Bug Tracker' type facility

{{if $formValue['new']}}
<span class="ipsBadge ipsBadge_style5">{$value}</span>
{{elseif $formValue['confirmed']}}
<span class="ipsBadge ipsBadge_style7">{$value}</span>
{{elseif $formValue['fixed']}}
<span class="ipsBadge ipsBadge_style6">{$value}</span>
{{elseif $formValue['closed']}}
<span class="ipsBadge ipsBadge_style2">{$value}</span>
{{endif}}

Im using the above but whilst the wording changes the background colour remains as ipsBadge_style5

Any help would be great

Thanks

Link to comment
Share on other sites

Ive worked it out thanks. If anyone needs it here you go

{{if $formValue == 'new'}}
<span class="ipsBadge ipsBadge_style2">{$value}</span>
{{elseif $formValue == 'confirmed'}}
<span class="ipsBadge ipsBadge_style7">{$value}</span>
{{elseif $formValue == 'fixed'}}
<span class="ipsBadge ipsBadge_style4">{$value}</span>
{{elseif $formValue == 'closed'}}
<span class="ipsBadge ipsBadge_style6">{$value}</span>
{{endif}}

 

Link to comment
Share on other sites

  • 10 months later...
 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

We use technologies, such as cookies, to customise content and advertising, to provide social media features and to analyse traffic to the site. We also share information about your use of our site with our trusted social media, advertising and analytics partners. See more about cookies and our Privacy Policy