Field setup "Tooltip field"

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
alex
User
Posts: 267

Field setup "Tooltip field"

Post by alex »

"Tooltip field" working differently comparing to v7. Information from defined "Tooltip field" displays onmouseover (when it is) as it was in previous versions but earlier versions never displayed an empty link in case there was nothing to display (if defined "Tooltip field" doesn't contain information). Now I need to check all the links when many of them are usually empty.

It would be nice if anyone could help me to solve the issue as follows: no information in "Tooltip field" - no empty link. Hyperlink appears in case defined "Tooltip field" contains information.

Thank you in advance.


mobhar
User
Posts: 11761

Post by mobhar »

If you leave "Tooltip field" under "Field" setup, then there is nothing to display when you hover your mouse on that control on "Edit" and "Add" page.

If you leave "Tooltip field" but define the phrase under "Multi-Language Property Editor" -> "Field Edit Tag Title" for that field (if you enable "Multi-Language"), then when you hover your mouse on that control on Edit/Add page, it will be displayed as the tooltip properly.

If you define both "Tooltipe field" and "Field Edit Tag Title" for that field, then the one you defined in "Tooltip field" will be used only in "List" and "View" page (Field Edit Tag Title will be ignored). But the one you defined in "Field Edit Tag Title" will be used in "Add" and "Edit" page.


alex
User
Posts: 267

Post by alex »

Well thanx for trying help me but my question concerns only a "list" and "view" pages using a "Tooltip field" option i. e. I need to display dynamically changed information from other tables column. To display a link only if information exist (in defined "Tooltip field" tables column). I am aware of the "Field Edit Tag Title" options.

So the question still actual.


mobhar
User
Posts: 11761

Post by mobhar »

alex wrote:
I need to display dynamically changed information from other tables column.

Assume your field name is "MyField", then simply put the following code in "Row_Rendered" server event:

if ($this->Export == "") {
$this->MyField->TooltipValue = "Your custom tooltip goes here";
}

This is just a simple example. Of course you may check the condition in each row to make the tooltip value is different.


alex
User
Posts: 267

Post by alex »

All I would need is to remove empty hyperlink from a list page. Of couse if its empty i.e. there is no information in defined source field - "Tooltip field".


Webmaster
User
Posts: 9430

Post by Webmaster »

The scripts allow you to change the field's TooltipValue by Row_Rendered event as above, you can also use it to remove the link if TooltipValue is empty, e.g.

if (trim($this->MyField->TooltipValue) == "") {
$this->MyField->HrefValue = ""; // assume the field does not have Href field
$this->MyField->LinkAttrs = array();
}


alex
User
Posts: 267

Post by alex »

Solved: Now can brief easily... Thank you my master!


Post Reply