Jump to content

{$service.statustext} setup


Recommended Posts

Hello, I am currently working on a template for my WHMCS based on bootstrap for both mobile and desktop.


The problem is, ive come to a point where i need to set the label for answered tickets, and tickets uses this form to call for the actual text, ie answered, customer-reply etc.

String alone:

Before edit:

As you can see, I call for a label-{$service.statustext} i use this because its dynamic, but it seems like it came with some unwanted HTML

<td><span class="label label-{$service.statustext}">{$service.statustext}</span></td>


but since the {$service.statustext} string, calls for alot more than text alone. I get this, in my html.




Not sure how to make the {$service.statustext} display only the actual text ie. Answered, so i can use that to call for a label-{$service.statustext}


Thank you all for reading, looking forward to your responses :)

Link to comment
Share on other sites

zomex's answer is probably the cleanest way to handle this, but an alternative would be to use replace to remove the unwanted html (if you can isolate it).



where "this" is what you want to replace, and "that" is what you want to replace it with or "" for blank.


you can also use multiple replaces in the same string.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated