• Resolved saralanda

    (@saralanda)


    I created a form that after a certain calculation ends with a result in the calculated field fieldnameX.

    I now want the user to be able to select everything that is displayed on that field by simply clicking on it.

    Thanks

Viewing 1 replies (of 1 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @saralanda

    Thank you very much for using our plugin. Assuming the calculated field is the fieldname123, you can insert an “HTML Content” field in the form with the following piece of code as its content:

    <script>
    jQuery(document).on('click', '[id*="fieldname123_"]', function(){
        var el = this;
        
        el.select();
        el.setSelectionRange(0, 99999); /* For mobile devices */
    
        /* Copy the text inside the text field */
        navigator.clipboard.writeText(el.value);
    });
    </script>

    Best regards.

Viewing 1 replies (of 1 total)

The topic ‘Select all text displayed on calculated field on click’ is closed to new replies.