Smartforms - Browser/Tab Title

  • 20 November 2014
  • 4 replies
  • 4 views

Badge +2

Hi,

 

First post in the Community so hopefully someone will be able to point me in the right direction.

 

We have a requirement to be able to manipulate the text displayed in the Browser/Tab title. We have a Smartform called Dashboard which when run, displays Dashboard in the Browser/Tab title. We would like to be able to add text to the end of this to also display additional text depending on say, some parameters passed to the Runtime URL which include a Client Number or something like that, so the Browser/Tab Title would display something like Dashboard - 1000.001.

 

I've checked out all the settings I can find in Smartforms and done some searching on K2 Help and just plain Google but I'm coming up short or its just not possible.

 

Hopefully this makes sense. Any guidance would be gratefully received.

 

Have a good day.

 

 

Dan


4 replies

Badge +3

What you need to do is use the 'Set a Form control's properties' action and select the Tab in question as the control. Select Configure and you can specify the text to display in the Tab Title.

 

You can type in text, use a form parameter, text value from a control or use an expression to construct the text to display.

 


12952iF0BDF2A079A85215.png
10839i70DACA019A9474CD.png
Badge +10

DanLees,

 

This should be fairly easily accomplished.

 

The "Label" control has an option called "Literal".  Make sure that is checked.  The Label control can handle a max of 255 characters if i remember correctly, and you should be able to put something like this in there:

 

<title>PotatoForm - 1000.001</title> 

 

Regards,

 

Mike

 

Edit:  Didn't notice the requirement for paramater based title, I now like KennyC's answer better.

Badge +2

Thanks!

 

I've realised I wasn't quite specific enough (or I have confused the requirements) in my description.

 

It's not a Tab within a Smartform we want to change, it's the actual IE/Chrome/Firefox Browser/Tab title we want to try and manipulate.

 

 

 

Dan

Userlevel 3
Badge +10

You could use a Label control with literal text checked and embed some Javascript that manipulates the title.  Something akin to: <script type=text/javascript> document.title = "your title"; </script>


 


15761iED16FE651C6B22AD.png


 


This is a possible yet quick and dirty way to do this.  I'll look into a more elegant solution.  Note that the label seems to disappear into the form when editing, because the browser interprets it as script.


 


 

Reply