How in the world connect dialogs works?

Hello. I had the same issue as you. Please have a look at this comment to resolve your issue: AP.dialog 'submit' and 'cancel' events - #5 by ReiPano
Have a nice day :grinning_face_with_smiling_eyes: