APIs & Integrations

DavidFJones
Membre | Partenaire solutions Platinum
Membre | Partenaire solutions Platinum

HTML Form Redirect to same page

Résolue

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 Votes
1 Solution acceptée
DavidFJones
Solution
Membre | Partenaire solutions Platinum
Membre | Partenaire solutions Platinum

HTML Form Redirect to same page

Résolue

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">

Voir la solution dans l'envoi d'origine

0 Votes
1 Réponse
DavidFJones
Solution
Membre | Partenaire solutions Platinum
Membre | Partenaire solutions Platinum

HTML Form Redirect to same page

Résolue

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 Votes