Copy Text to Clipboard using List Page information

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

Copy Text to Clipboard using List Page information

Post by alex »

Lets say I have a table and field "name" and I need to copy to clipboard a text using information from list page like "Hello, <name>...". The idea is to use the copied text for different messengers.

I am not strong in javascript so any help would be appreciated.

With no success I tried to use custom field together with "Row Rendered event" and also "ListOptions Rendered event" + "Row Custom Action event"

I read the posts below:
viewtopic.php?t=48006
viewtopic.php?t=50568

But I still cannot solve my task. Please help or advise.


arbei
User
Posts: 9390

Post by arbei »

  1. You should not use Custom Field as it will add an extra field unnecessarily.
  2. You should not use Row_CustomAction as it is not a custom action (which submit the row's primary key by Ajax or post back for some action),
  3. Copying to clipboard is JavaScript on the client side. Try to write your JavaScript. You may post your code for discussion. PHPMaker itself has a basic function ew.copyToClipboard(source) where source is CSS selector or HTML element.

Post Reply