split invite email input to three input and change the js logic