Don't think I follow. Submit buttons don't have URL's. If you are talking about the action URL on the <form> tag, that can indeed be made dynamic. However, the URL that you post to informs Umbraco Forms of the page it should consider your form as residing on when it stores the submission.
In other words, if you change that URL, Umbraco Forms may get confused about which page the submission came from.
Supposing I've interpreted your question correctly, why are you trying to make the form action dynamic?
I am trying to send the form submission to a different page depending on the selection of the user. I problem is the payment site has specific pages for the amount the person is paying....
Example:
Person is employee, so they pay $25.
Person is community member, so they pay $75.
So if they said they are employee, if they submit the form it should go to payment page of $25 to pay. If they are community member, they go to the $75 page to pay.
I was trying to see if I need to create different forms for the different type of person or just go to different pages after they submit the form. Let me know if you are still not understanding. I am sorry if I am not being clear still.
If I understand, this form simply serves the purpose of redirecting somebody to a particular page depending on the inputs.
My guess is you are attempting to accomplish this with the "thank you" page functionality built into Umbraco Forms, which of course won't work because it only allows for a single thank you page.
Instead, you can create a custom Form.cshtml used by this one form. That file can contain the logic that will determine where to redirect to, which it can then do with Response.Redirect. No need to use the thank you page at all.
Making the URL for Submit button dynamic...
Hi All,
Is there a good way to make the URL dynamic on forms? Or is that even possible with Umbraco forms?
Thank you, Antoinette
Don't think I follow. Submit buttons don't have URL's. If you are talking about the
action
URL on the<form>
tag, that can indeed be made dynamic. However, the URL that you post to informs Umbraco Forms of the page it should consider your form as residing on when it stores the submission.In other words, if you change that URL, Umbraco Forms may get confused about which page the submission came from.
Supposing I've interpreted your question correctly, why are you trying to make the form action dynamic?
I am trying to send the form submission to a different page depending on the selection of the user. I problem is the payment site has specific pages for the amount the person is paying....
Example: Person is employee, so they pay $25. Person is community member, so they pay $75.
So if they said they are employee, if they submit the form it should go to payment page of $25 to pay. If they are community member, they go to the $75 page to pay.
I was trying to see if I need to create different forms for the different type of person or just go to different pages after they submit the form. Let me know if you are still not understanding. I am sorry if I am not being clear still.
If I understand, this form simply serves the purpose of redirecting somebody to a particular page depending on the inputs.
My guess is you are attempting to accomplish this with the "thank you" page functionality built into Umbraco Forms, which of course won't work because it only allows for a single thank you page.
Instead, you can create a custom
Form.cshtml
used by this one form. That file can contain the logic that will determine where to redirect to, which it can then do withResponse.Redirect
. No need to use the thank you page at all.Why not the same page with diffrent content depending on the user type. Would be easier.
is working on a reply...