Add form prepare listener