Hi,
I would like my site to be able to pre-fill information that the “Members” databate when that member creates a post. In particular, their name and email address, so the post cannot be submitted anonymously.
The following code appears to works on screen. The data from the membership database is is displayed in #Member1, 2, etc… and upon pressing the WriteButton1, shows up in the #Cont1,2, etc as hoped, which is connected to the form submission dataset.
However, when submitting the form, none of the data is saved to the dataset. Can you please help?
export function WriteButton1_click(event) {
$w(‘#VidButton1’).disable();
$w(‘#PicButton1’).disable();
$w(‘#buttonBeginWrite’).expand(“”);
$w(“#dataset1”).onReady(()=>{
let itemObj1 = $w(“#Member1”).value;
let itemObj2 = $w(“#Member2”).value;
let itemObj3 = $w(“#Member3”).value;
let itemObj4 = $w(“#Member4”).value;
{
$w(“#Cont1”).value = itemObj1;
$w(“#Cont2”).value = itemObj2;
$w(“#Cont3”).value = itemObj3;
$w(“#Cont4”).value = itemObj4;
$w(“#Cont5”).value = “Yes”;
$w(“#Cont6”).value = “”;
$w(“#Cont7”).value = “”
}
});
}