Function to capture a value and store it in a variable

I had a similar task with Contact Form 7, my approach was to add a hidden field to the form in CF7 and then write some jQuery to assign the value to the hidden field when the page was ready.

<script>
    jQuery(document).Ready(function(){
        document.getElementById('hiddeninputID').value = document.getElementById('cphone').value;
    });
</script>

Using the above script is the simplest way to do what you want to achieve, using PHP will work but that may require you to update the PHP code along with the regular Gravity forms updates. The script won’t impact on page speed and should always be compatible. Replace hiddeninputID to the ID of the input field that you’ve added

Update:

To take into account the example provided:

<script>
    jQuery(document).ready(function() {
        var mmPhone = document.getElementById("mm-cphone").innerHTML;

        jQuery("#input_4_10").val(mmPhone);
        jQuery("#input_4_11").val(mmPhone);
    });
</script>