I’ve been following a vorbly code guide to try and get my auto fill working on a form but have run into some issues and can’t seem to figure it out. I’ve included the comparison for code that works and doesn’t work. The code that doesn’t work is what I really need help figuring out.
This code works :
Shows:
Code:
$w.onReady (function () {
$w("#input1").value = "Test"
})
export function Submit_click(event, $w) {
$w('#dataset1').setFieldValue('fname', $w('#input1').value);
}
Database Result:
This code doesn’t work and I can’t figure out why. I’ve been trying to fetch information from another database field to auto-fill a new field in a different database, however it isn’t collecting the input data when I click submit.
Shows:
Code:
$w.onReady (function () {
$w('#dataset2').onReady ( () => {
$w("#input1").value = $w("#dataset2").getCurrentItem().fname;
})
})
export function Submit_click(event, $w) {
$w('#dataset1').setFieldValue('fname', $w('#input1').value);
}
Database Result:
Any help to make it work would be greatly appreciated! I have been trying for hours to figure it out, with no luck.
Thanks in advance