# CASE: create an infotext as hover

**URL:** <https://community.silverfin.com/t/case-create-an-infotext-as-hover/723>\
**Category:** Cases\
**Tags:** infotext, input\_comment, use\_case\
**Created:** [March 9, 2018, 8:49am UTC](https://community.silverfin.com/t/case-create-an-infotext-as-hover/723 "2018-03-09T08:49:54Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![sven](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/sven/32/1495_2.png) [@sven](https://community.silverfin.com/u/sven)\
**Post date:** [March 9, 2018, 8:49am UTC](https://community.silverfin.com/t/case-create-an-infotext-as-hover/723/1 "2018-03-09T08:49:55Z")

</div>

📣📣 This is a really nice update we just launched last night 📣📣

It is now possible to create certain infotext, but then as hover where the user has to mouse-over the infotext to see what it is saying :

![09](https://canada1.discourse-cdn.com/flex030/uploads/getsilverfin/original/1X/001713c3de6fe843b3aece25ba58fcc0b76deccb.png)

To use this, simply use this code :

```auto

{::infotext as="hover"}
this text will be shown on hover
{:/infotext} 

```

Possibilities are HUGE here

For example, you could guide an user more into why the alarmbel procedure is active :

```auto

{% assign netto_actief = #16__59 %}
{% assign maatschappelijk_kapitaal = -1*#100 %}

  {% if netto_actief <= maatschappelijk_kapitaal/2 %}{% assign alarmbel = true %}{% endif %}
  {% unless sbvba %}
    {% if company_form == 'NV' or company_form == 'COMMVA' %}
      {% assign limit_alarmbel = "61.500" %}
      {% if netto_actief < 61500.00 %}{% assign artikel_634 = true %}{% endif %}
    {% elsif company_form == 'CVBA' %}
      {% if netto_actief < 6200 %}{% assign artikel_432 = true %}{% endif %}
      {% assign limit_alarmbel = "6.200" %}
    {% else %}
      {% if netto_actief < 6200 %}{% assign artikel_333 = true %}{% endif %}
      {% assign limit_alarmbel = "6.200" %}
    {% endif %}
  {% endunless %}

{% if alarmbel %}

{::infotext as="hover"}
There is calculated with **{{ limit_alarmbel }}** as a limit.  
Net assets are **{{ netto_actief | currency }}** and shared capital / 2 is **{{ maatschappelijk_kapitaal/2 | currency }}**.   
{:/infotext}

{% endif %} 

```

Which gives this result :

![33](https://canada1.discourse-cdn.com/flex030/uploads/getsilverfin/original/1X/0587a344999f83b913c7b270d05a1d0afb9cffc6.png)

---

<div class="post-metadata">

**Author:** ![Bart\_Verhaeghe](https://avatars.discourse-cdn.com/v4/letter/b/c4cdca/32.png) [@Bart\_Verhaeghe](https://community.silverfin.com/u/Bart_Verhaeghe)\
**Post date:** [March 15, 2018, 3:03pm UTC](https://community.silverfin.com/t/case-create-an-infotext-as-hover/723/2 "2018-03-15T15:03:10Z")

</div>

That really is a very nice update … Potential uses aimed at boosting UX are huge …Great work!

---

<div class="post-metadata">

**Author:** ![Bart\_Verhaeghe](https://avatars.discourse-cdn.com/v4/letter/b/c4cdca/32.png) [@Bart\_Verhaeghe](https://community.silverfin.com/u/Bart_Verhaeghe)\
**Post date:** [March 26, 2018, 12:00pm UTC](https://community.silverfin.com/t/case-create-an-infotext-as-hover/723/3 "2018-03-26T12:00:54Z")

</div>

Hi Sven,

A really nice update … but I was wondering … is it possible to adapt the width of the message box (I’d like to put some legal articles in there as additional information but the box is rather narrow)?

Thanks!

---

<div class="post-metadata">

**Author:** ![sven](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/sven/32/1495_2.png) [@sven](https://community.silverfin.com/u/sven)\
**Post date:** [April 2, 2018, 3:23pm UTC](https://community.silverfin.com/t/case-create-an-infotext-as-hover/723/4 "2018-04-02T15:23:35Z")

</div>

@Bart_Verhaeghe,

no, it isn’t. In your case I’d suggest just an info-tag then perhaps; a hoover text can’t be overloaded with info (in our honest opinion 😌 )

---

<div class="post-metadata">

**Author:** ![Andrew](https://avatars.discourse-cdn.com/v4/letter/a/f19dbf/32.png) [@Andrew](https://community.silverfin.com/u/Andrew)\
**Post date:** [April 4, 2018, 8:23am UTC](https://community.silverfin.com/t/case-create-an-infotext-as-hover/723/5 "2018-04-04T08:23:28Z")

</div>

@sven  
Is it possible to change the colour of the hover to red for example ? or is it always grey ?

I tested this in one of our templates - see below…

I just want the hover-text to be shown if their isn’t a file uploaded. Problem i’m having with current code is that hoover-text is always shown. Even if a file is uploaded. Can you see what i’m doing wrong ?

{% if detail.custom.file == blank %}

{::infotext as=“hover”}  
Vergeet je bijlage van je openstaande klanten niet toe te voegen !

{:/infotext}

{% endif %}

{% fori detail in current\_account.details %}{% if forloop.first %}

|------------------------------|----------|--------------:+  
| {% t “Zie afzonderlijke proef- en saldibalans” %}|{% input detail.custom.file as:file %}| {% input detail.custom.value as currency %}{% endif %}{% endfori %}

---

<div class="post-metadata">

**Author:** ![sven](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/sven/32/1495_2.png) [@sven](https://community.silverfin.com/u/sven)\
**Post date:** [April 4, 2018, 9:00am UTC](https://community.silverfin.com/t/case-create-an-infotext-as-hover/723/6 "2018-04-04T09:00:23Z")

</div>

@Andrew,

Sorry to disappoint, but you can’t change the color. This is done of course to get a uniform look & feel in Silverfin 🙂

Regarding your code, try changing your if-statement into this :

```auto

{% if detail.custom.file.document %}

```

Adding the `document`to the object, will make it possible to check whether or not a document has been added.

---

<div class="post-metadata">

**Author:** ![Andrew](https://avatars.discourse-cdn.com/v4/letter/a/f19dbf/32.png) [@Andrew](https://community.silverfin.com/u/Andrew)\
**Post date:** [April 4, 2018, 9:26am UTC](https://community.silverfin.com/t/case-create-an-infotext-as-hover/723/7 "2018-04-04T09:26:28Z")

</div>

Thx Sven!

Like this - see below … ? Not working for the moment. Must there not be added == blank ? or something else.  
{% if detail.custom.file.document == blank %}

{% if detail.custom.file.document %}  
{::infotext as=“hover”}  
Vergeet je bijlage van je openstaande klanten niet toe te voegen !  
{:/infotext}  
{% endif %}

{% fori detail in current\_account.details %}{% if forloop.first %}  
|------------------------------|----------|--------------:+  
| {% t “Zie afzonderlijke proef- en saldibalans” %}|{% input detail.custom.file as:file %}| {% input detail.custom.value as currency %}{% endif %}{% endfori %}

---

<div class="post-metadata">

**Author:** ![sven](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/sven/32/1495_2.png) [@sven](https://community.silverfin.com/u/sven)\
**Post date:** [April 4, 2018, 9:30am UTC](https://community.silverfin.com/t/case-create-an-infotext-as-hover/723/8 "2018-04-04T09:30:04Z")

</div>

It works for me @Andrew.

Because it’s not related to the subject of this topic, I’ll link you to

> [@CASE: how to check if a document has been added](https://community.silverfin.com/t/case-how-to-check-if-a-document-has-been-added/799):
>
> If you have following code to make it possible to add an attachment : {% input custom.director.pay\_check as:file %} then you can check whether or not a document has been added, by adding .document to the object with an if-statement, like this : {% if custom.director.pay\_check.document %} There's a file added {% endif %}

If it doesn’t work, create a separate topic perhaps with the full code (with how the file is generated).

---

<div class="post-metadata">

**Author:** ![Andrew](https://avatars.discourse-cdn.com/v4/letter/a/f19dbf/32.png) [@Andrew](https://community.silverfin.com/u/Andrew)\
**Post date:** [April 4, 2018, 10:08am UTC](https://community.silverfin.com/t/case-create-an-infotext-as-hover/723/9 "2018-04-04T10:08:53Z")

</div>

@sven

It works now ! I didn’t put my code within the fori-loop.

Last question - i see that hover-text is also exported when you put your template into pdf. Can that be switched off ? or not be shown ?

Thx !

---

<div class="post-metadata">

**Author:** ![sven](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/sven/32/1495_2.png) [@sven](https://community.silverfin.com/u/sven)\
**Post date:** [April 4, 2018, 11:04am UTC](https://community.silverfin.com/t/case-create-an-infotext-as-hover/723/10 "2018-04-04T11:04:33Z")

</div>

@Andrew,

It can! Just use ic-tags like this :

```auto

{% ic %}
This will only be shown in input, and not in export / preview 
{% endic %}
```

---

<div class="post-metadata">

**Author:** ![jhanley](https://avatars.discourse-cdn.com/v4/letter/j/43a26b/32.png) [@jhanley](https://community.silverfin.com/u/jhanley)\
**Post date:** [September 7, 2018, 11:21am UTC](https://community.silverfin.com/t/case-create-an-infotext-as-hover/723/11 "2018-09-07T11:21:32Z")

</div>

Hi @sven,

This is a nifty little function! Is there a way to have the text showing from the left-hand side of the icon? When the icon is close to the right hand-side margin of the web browser, the text is cut off on the template:

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/getsilverfin/original/1X/583d525a3e81566938d098971be9123036c25875.png)

Many thanks  
Joe

---

<div class="post-metadata">

**Author:** ![robindeclercq](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/robindeclercq/32/472_2.png) [@robindeclercq](https://community.silverfin.com/u/robindeclercq)\
**Post date:** [September 10, 2018, 8:57am UTC](https://community.silverfin.com/t/case-create-an-infotext-as-hover/723/12 "2018-09-10T08:57:30Z")

</div>

Hi @jhanley,

This is a well-known issue and is in the planning to be resolved.

We will keep you updated as soon as this is fixed!

Kind regards,  
Robin
