Hi.
I created a custom database and a form page for site members to read and write/update.
I also created a copy of the form in a separate page only for the admin to access and do a search by member email. When client/member email is entered the form fields need to populate with the client specific information. Then the admin need to be able to update as well.
Couldn’t get it to work.
Here is the code I used. (Just added a few of the input fields in the code to begin with and test)
Appreciate any help.
Thank you.
import wixData from 'wix-data';
export function emailSearch_click_1(event) {
wixData.query("CPEWorkOrder")
.contains("email", $w("#emailSearch").value)
.find()
.then(res => {
$w("#dataset1").getCurrentItem()
});
let item =
$w.onReady(function () {
$w("#input1").value = item.fullName;
$w("#input2").value = item.address;
$w("#input3").value = item.phoneNumber;
});
}