Not clearing auto-filled input fields after form submission

Try this one…

$w.onReady(function() {
    $w('#dataset1').onReady(()=> {
        $w("#input1").value = $w("#dataset1").getCurrentItem().fname;        
    });

    $w('#dataset2').onReady(() => {
        $w('#dataset2').setFieldValue('fname',$w('#input1').value);
        $w('#dataset2').save();
    });    
});

And also take a look at this one, if you are using Wix-Forms…

…and this one…

And i also ask myself → where is your SUBMIT-BUTTON-CLICK in the code?