'Auto filled textbox using data from a table

I have a textbox for inputting the "milled volume" of a given log(wooden log). However I want to have this field auto filled by the same logs "initial volume" which is already filled and submitted in from a separate form and stored in a separate table, how can I reference the corresponding "initial volume" when a user clicks on the text box to fill in this text box

<div class="row">
    <div class="col-md-4">
        <label>Volume (m<sup>3</sup>)</label>
    </div>
    <div class="col-md-8 form-group">
        <input type="text" class="form-control" name="milled_volume" required>
    </div>
</div>


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source