Problem when editing hyprlink field containing @ character

QuestionsProblem when editing hyprlink field containing @ character
Alexander asked 7 years ago

In my database I've a field containing the client's emails. I set phpgrid to render this field as hyperlink. If I use the inline editing function (not the editing with the form) and then use the restore function, the script stop responding and I need to reload the gird. This doesn't happens with all hyperlinks, but only if the field contains @ character (like email address).
You can try this also on your demo page (I tried in Appearence/External Link page).


1 Answers
Abu Ghufran answered 7 years ago

Please use this syntax:

// raw link formatter
$col["formatter"] = "function(cellval,options,rowdata){ return '<a target="_blank" href="http://'+cellval+'">'+cellval+'</a>&#039;; }";
$col["unformat"] = "function(cellval,options,cell){ return $('a', cell).attr('href').replace('http://&#039;,''); }";

$cols[] = $col;

After removing link + link_options.

Your Answer

8 + 14 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.

How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?