No announcement yet.

cell in grid with <a href=""></a>

  • Filter
  • Time
  • Show
Clear All
new posts

  • cell in grid with <a href=""></a>


    I have a grid with data: Id, Name, URL, Date

    Need when visualize the result in grid, show only NAME, but need name by CLIKABLE and open new web page with information from URL.

    In this moment, I have NAME and another columm with URL, in effect, URL is CLICKABLE, but need only NAME appear and by CLICKEABLE.

    Anybody now if it's possible???

  • #2
    Yes, create a text field and put the whole HTML into the database like this <a href="">Amazon</a>

    When it appears in the grid it will be a clickable link with only the Amazon part printed.

    Or you generate the same thing by combining the two fields from the db.
    $html = "<a href='" . {url} . "'>" . {name} . "</a>";
    {newlink} = $html;

    Put this in the events under "onRecord". I tested the first method, the second may need better escaping using single quotes inside double quotes to get the same string as in the first example. .


    • #3
      1 way is

      Add new field.

      On the Onrecord event change the content of the new field to an href. Example below

      {Name} = "<a href='{URL}'>{Name}</a>";

      See screenshot below. It should work. Note that the URL uses single quotes this time

      There could be other ways, but this is how I do it.


      • #4
        Solutions works very well, really tank's for both, thanks...