Multi-field copy/paste

My app is a photo library, where records are created (with only ID numbers and links) as images are scanned, with descriptions added later (possibly much later) .
I want to implemt custom buttons for "Copy all fields" and "Paste all empty fields" to simplify describing a number of similar photos.
I have thought about PHP, storing the fields in an array in $_SESSIONS, but don't know enough about Javascript etc to know if it can be done better in the browser rather than the back-end.

Any suggestions or examples, please?

You are using DaDaBIK version 10.2-Manarola enterprise, installed on 02-08-2020 (installation code: xxx), the latest version of DaDaBIK is 10.3-Manarola released on 26-08-2020

PHP Version: 7.2.24-0ubuntu0.18.04.6
mysql version: 5.5.5-10.3.23-MariaDB-1:10.3.23+maria~bionic
Web server: Apache/2.4.29 (Ubuntu)
Client: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:81.0) Gecko/20100101 Firefox/81.0
 

eugenio

Administrator
Staff member
Hello,
if you mean pasting something you have in the clipboard on another record's form, you definitely needs javascript and if you are not familiar with it, probably it's not super easy to implement.

Otherwise you have to create a custom php page that takes in input one record an copy in the backend the values of some fields on other records (a select statement + an update statement on several records).

Best,
 
I have fiddled with this while watching motorsport over the weekend, and have implemented a JavaScript function accessed via a custom button which iterates through a list of field names and saves the current values in web browser sessionStorage nodes, rather than creating a JSON string or similar in the clipboard. A second function retrieves the values and assigns them into the input fields on a different page.
It wasn't too bad, except for the select_multiple_checkbox fields.
 
Top