$w('#input').value not working

I’m trying out velo for the first time, and I am just trying to do a simple console.log of values from an input field. I am not getting any value returned. These are just input fields that are number types. I enter in 200 for #input2 and it should log (“Claims”, 200). My onClick event handler is running because I am getting the console.logs, but it is not reading any values on the input fields.

$w . onReady ( function () {
const claims = $w ( ‘#input2’ ). value ;
const avgClaimVal = $w ( ‘#input15’ ). value ;

$w ( '#button7' ). onClick (( event ) => { 
    console . log ( 'Claims' ,  claims ); 
    console . log ( 'Average' ,  avgClaimVal ); 
}) 

});

$w.onReady(function() {
    $w('#button7').onClick((event) => {
        const claims = $w('#input2').value;
        const avgClaimVal = $w('#input15').value;
        console.log('Claims', claims);
        console.log('Average', avgClaimVal);
    });
});