Dynamic Text Input Field in Wix Form

May I know the Velo code to populate a text input field in Wix Form app. The default value for the field is taken from another dataset.

With my very limited know-how in Velo, I had something like this which I think is incorrect:

$w.onReady(() => {
	// Populate Apartment field with Dynamic Apartment name
    $w("#dynamicDataset").onReady(() => {	
 		const item = $w("#dynamicDataset").getCurrentItem();
 		$w('#input11').value = (item.title);
		}
    });

Managed to get the code working. Have to use setFieldValue function.

The default value will be written to the dataset once the form is submitted.


$w.onReady(() => {
    $w("#dynamicDataset").onReady(() => {
        let item = $w("#dynamicDataset").getCurrentItem().title;
        console.log(item);
		$w('#dataset2').onReady(() => {
			$w("#dataset2").setFieldValue("title", item);
			$w("#dataset2").setFieldValue("leadSource", "Booking Request");


		});
    });
});