format modal code