I’m not exactly sure what you are trying to achieve but if I understand correctly it would likely be a good case to use a Flow. Using the condition … if condition is met then run action 1, else run action 2. Instead of a submit button, add an onClick event to your button and run the flow.
Maybe I’m not understanding what you are trying to do. You may need to provide more details.
Yes thanks Brad sort of came to that conclusion just interested to see whether it would be a reasonable approach to conditionally send the form data to different endpoints based on user input.