N
Nuxt2y ago
Romi

Clear data and show confirmation message

this is something basic but have tried searching about it but struggling to find anything, any help would be much appreciated. This currently submits correctly but all the data in the inputs don't clear
const client = useSupabaseClient()


const createDriver = async (e) => {
const { name, email, employed, active } = e.target.elements
const { data, error } = await client.from('drivers').insert([
{
name: name.value,
email: email.value,
employed: employed.value,
active: active.value,
},
])
if (error) {
console.log(error)
}

}
const client = useSupabaseClient()


const createDriver = async (e) => {
const { name, email, employed, active } = e.target.elements
const { data, error } = await client.from('drivers').insert([
{
name: name.value,
email: email.value,
employed: employed.value,
active: active.value,
},
])
if (error) {
console.log(error)
}

}
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server