APIs & Integrations

DavidFJones
Membro | Parceiro Platinum
Membro | Parceiro Platinum

HTML Form Redirect to same page

resolver

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 Avaliação positiva
1 Solução aceita
DavidFJones
Solução
Membro | Parceiro Platinum
Membro | Parceiro Platinum

HTML Form Redirect to same page

resolver

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

Exibir solução no post original

0 Avaliação positiva
1 Resposta 1
DavidFJones
Solução
Membro | Parceiro Platinum
Membro | Parceiro Platinum

HTML Form Redirect to same page

resolver

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 Avaliação positiva