Hi,
I have Font Awesome uploaded in External Lib. In my Grid there is a Web field, which is a type of text. Below is the code added in OnRecord event. The output is charming. I get a link icon from Front Awesome, which is clickable.
The downside is that, when exporting to anything, I get blank fields. i.e. when exporting to PDF, blank fields or when XLS again blank fields.
I realized that an event, onExport is needed. So, when exporting, either the code can be transferred or original text fields can be used instead of icons.
Any idea how to catch a similar event?
The Code in OnRecord Event of the Grid:
echo "<link rel='stylesheet' type='text/css' href='".sc_url_library('sys','awesome','font-awesome.css')."'/>";
if(!empty({web}))
{
sc_link(web,{web},,{web},"_blank");
{web}="<i class='fa fa-external-link '></i>";
}
if({optional}==0)
{
{optional}="<i class='fa fa-close '></i>";
sc_field_color("Optional", "#33FF66");
}
else
{
{optional}="<i class='fa fa-check '></i>";
sc_field_color("Optional", "#ff0000");
}
Snapshot of the fields with Font Awesome:
[ATTACH=CONFIG]n69492[/ATTACH]