New Step Forms get HTTP ERROR 405

KK
KK
Vote:
 

Hi guys,

What I did was steps as below:

  1. A Empty project setup with Form nuget addition.
  2. A simple home page created with contentarea property
  3. Created a new form with textboxes and step buttons (one step + one textbox). Tried to make it as simple as possible for testing purpose
  4. After publish, and open the visitor page on localost:5000

Result: The first load displays ok, but if click next step button, it will throw 405 error. No matter it is a step button or submit button. Same result.

Any ideas?

Thanks so much in advance.

#283330
Edited, Jul 07, 2022 4:10
Vote:
 

Hi there,

Have you added the below line of code to the <head> section in your layout/root view? I don't believe this is included by default in the 'Empty Project' template.

@Html.RequiredClientResources("Header")

It will render the javascript required for the forms to function correctly. You will see <script> elements being added onto your page containing forms related functionality.

Note you also need this one inside the <body> at the bottom:

@Html.RequiredClientResources("Footer")

More info:
https://docs.developers.optimizely.com/content-cloud/v12.0.0-content-cloud/docs/client-resources#rendering-the-required-client-resources

#283545
Jul 11, 2022 23:58
KK
Vote:
 

This is the one I am looking for. Thanks so much. 

#283554
Jul 12, 2022 8:32
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.