APIs & Integrations

DavidFJones
Mitglied | Platinum Partner
Mitglied | Platinum Partner

HTML Form Redirect to same page

lösung

Hey all,

I am building a custom cms theme and need a custom form to be included in one of the pages. 

I'm having issues getting the form to properly redirect to the same page. Currently this is my opening form tag - 

<form action="{{request.path}}" method="POST" class="profile-form" enctype="multipart/form-data">

However, when users submit this form, the page they are shown just shows 
"Request Forbidden" on screen. 

This form contains a name input, an email input, and a file upload input.

 

0 Upvotes
1 Akzeptierte Lösung
DavidFJones
Lösung
Mitglied | Platinum Partner
Mitglied | Platinum Partner

HTML Form Redirect to same page

lösung

I figured out what the issue is. Currently with HubSpot, and third party/outside form will only work with GET requests, and not post. Changing the opening tag to have a GET request fixes this issue

<form action="{{request.path}}" method="GET" class="profile-form" enctype="multipart/form-data">

Lösung in ursprünglichem Beitrag anzeigen

0 Upvotes
1 Antwort
DavidFJones
Lösung
Mitglied | Platinum Partner
Mitglied | Platinum Partner

HTML Form Redirect to same page

lösung

I figured out what the issue is. Currently with HubSpot, and third party/outside form will only work with GET requests, and not post. Changing the opening tag to have a GET request fixes this issue

<form action="{{request.path}}" method="GET" class="profile-form" enctype="multipart/form-data">
0 Upvotes