APIs & Integrations

DavidFJones
メンバー | Platinum Partner
メンバー | Platinum Partner

HTML Form Redirect to same page

解決

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 いいね!
1件の承認済みベストアンサー
DavidFJones
解決策
メンバー | Platinum Partner
メンバー | Platinum Partner

HTML Form Redirect to same page

解決

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 いいね!
1件の返信
DavidFJones
解決策
メンバー | Platinum Partner
メンバー | Platinum Partner

HTML Form Redirect to same page

解決

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 いいね!