Can someone tell me why, when I copy and paste this code in line, and change the button it’s referencing (changed button4 to button41 in all 3 places its referenced), why when clicking button41, the same thing isn’t executed???
This is the only reference to button4 in the page code.
Could it be something in some other code somewhere?? What can I be missing?
All I want to do is duplicate the functionality
export function button4_click ( event ) {
$w ( ‘#button4’ ). disable ()
let toInsert = {
propAvailabilityDate : data . _id ,
member : wixUsers . currentUser . id ,
availabilityDate : data . weekAvailable ,
property : data . property . _id
}
wixData . insert ( “BookingemailClicks” , toInsert ). then (() => {
let date = sortDate ( data . weekAvailable )
// console.log(“mailto:” + data.property.bookingsEmail + "?subject=Booking " + data.property.title + " from " + date )
wixLocation . to ( “mailto:” + data . property . bookingsEmail + "?subject=Booking " + data . property . title + " from " + date )
$w ( ‘#button4’ ). enable ()
//$w(‘#bookedStrip’).expand()
})
}