Uses promises for form submit