How would I do it in an onSubmit script?