Submit to itself don’t work

$formtxt .= '<form  style="width: 800px;" name="time_booking"  action="#" onsubmit="return validateCalendarForm();" method = "POST">';

action is set to #. maybe that is the cause. try removing that.

action=""

additionally a js function validateCalendarForm() is calling on form submit. so check console for errors too. and lastly refresh permalink structure