How can I conditionally submit a form?

Thanks a lot it really helps