Support » Plugin: Calculated Fields Form » Copy Clipboard
Copy Clipboard
-
Can you help me to add copy clipboard function when click in filed?
-
Hello @dhevilz
Thank you very much for using our plugin. The
COPYFIELDVALUE
operation in the plugin copies the field’s value to the clipboard.COPYFIELDVALUE( # or fieldname#, form object or form id or consecutive form number )
For example, if you have the fieldname1 field, and you want to copy its value to the clipboard by clicking on it, you can insert an “HTML Content” field in the form and enter the following piece of code as its content:
<script> jQuery(document).on('click', '[id*="fieldname1_"]', function(){ COPYFIELDVALUE('fieldname1', this.form); }); </script>
Best regards.
when i have 4 field to add this function,, can i write like this?
<script> jQuery(document).on('click', '[id*="fieldname1_"]', function(){ COPYFIELDVALUE('fieldname1', this.form); }); jQuery(document).on('click', '[id*="fieldname2_"]', function(){ COPYFIELDVALUE('fieldname2', this.form); }); jQuery(document).on('click', '[id*="fieldname3_"]', function(){ COPYFIELDVALUE('fieldname3', this.form); }); jQuery(document).on('click', '[id*="fieldname4_"]', function(){ COPYFIELDVALUE('fieldname4', this.form); }); </script>
Hello @dhevilz
Yes, that’s an alternative. But you can implement it more simpler:
<script> jQuery(document).on('click', '[id*="fieldname1_"],[id*="fieldname2_"],[id*="fieldname3_"],[id*="fieldname4_"]', function(){ COPYFIELDVALUE(this, this.form); }); </script>
Best regards.
it looks like there is some error so the function is not running
check in my site link
my code https://prnt.sc/u3ulQ-mEOsJq
Hello @dhevilz
You are calling the
COPYFIELDVALUE
value with the containers. The containers do not have value attributes. You must call theCOPYFIELDVALUE
operation with entry or calculated fields, like:COPYFIELDVALUE('fieldname15');
Best regards.
can you tell me how to custom copy?
my field contain symbol like “Rp” and Symbol for grouping thousands ” . “
when field show Rp 1.000.000, this copy clipbord is olny 1000000
Hello @dhevilz
I’m testing your form, and by clicking on the “DPP 11%” field, it copies the value with the currency symbol and format to the clipboard,
Ex.
Rp 10.810.811
Best regards.
yes sure, but can i get copy of clipboard only 10810811 (number value only)?
Hello @dhevilz
The plugin copies the field’s value to the clipboard in raw mode. It does not pre-process the field’s value before copying it to the clipboard.
Best regards.
oke, thanks bro ..
- You must be logged in to reply to this topic.