Help, can't code getting event and form

Hi,
I really thought I’d got this but I suspect my knowledge of chaining promises is letting me down.
Can anyone see an obvious error in this code snippet?

function populateEventFields (slug ) {
return searchEventBackend(slug)
. then ( ( result ) => {
$w ( ‘#eventTitle’ ). text = result . title ;
return ( result );
})
. then ( eventResult => {
eventId = eventResult._id ;
return ( wixEvents . getForm ( eventId ))
})
. then ( formResult => {
let inputFields = formResult . formData . formInputs ;
return form ;
} )
. catch ( ( error ) => {
console . log ( ‘this is where it all goes wrong’ );
console . error ( error );
})
}