Answers.Body: <p>The issue seems to be quite simple: the module is referenced incorrectly in the example code. The example action-input is:</p>
  <p><code>&lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;business-logic/example/example-form-submit&quot;&gt;  </code></p>
  <p>but it should be:</p>
  <p><code>&lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;businesslogic/example/example-form-submit&quot;&gt; </code></p>
  <p>Omitting the dash in the &quot;business-logic&quot; name, since the module is being loaded as &quot;businesslogic&quot; instead.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-02-04T14:51:36.940Z
Answers.LastActivityDate: 2023-02-04T14:51:36.940Z
Answers.UserDisplayName: Mitchell
Answers.Body: <p>Did you remember to add the action as a hidden input (<code>&lt;input type="hidden" name="action" value="business-logic/example/example-form-submit"&gt;</code>, rather than an <code>action</code> attribute on the form? And also use <code>method="post"</code> on the form.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-24T14:42:05.113Z
Answers.Text: Yes, it's set up like that and I've tried via the {{ actionInput() }} as well.
Answers.UserDisplayName: Mitchell
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-24T10:32:57.803Z
Answers.LastActivityDate: 2020-02-24T10:32:57.803Z
Answers.UserDisplayName: James Smith
Body: <p>I set up the business logic module template following these instructions:
  <a href="https://doublesecretagency.github.io/craft-businesslogic/installation" rel="nofollow noreferrer">https://doublesecretagency.github.io/craft-businesslogic/installation</a></p>
  
  <p>The test works out well, so everything seems to be in order.</p>
  
  <p>However, when I add the example action to a form and submit it, I get a 404:</p>
  
  <p>Unable to resolve the request "business-logic/example/example-form-submit".</p>
  
  <p>How do I find and fix the underlying issue?</p>
  
  <p>EDIT: I tried setting up a module via <a href="https://pluginfactory.io/" rel="nofollow noreferrer">https://pluginfactory.io/</a> and that works like a charm.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-24T19:21:43.750Z
Comments.Text: Are you logged in or logged out when you are submitting the form? Perhaps try enabling [anonymous access...](https://github.com/doublesecretagency/craft-businesslogic/blob/master/src/controllers/ExampleController.php#L39)
Comments.UserDisplayName: Lindsey D
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-25T07:31:09.127Z
Comments.Text: Hi Lindsey, yes I am logged in as admin user. Even when enabling anonymous access it returns a 404. I've managed to solve my problem using the pluginfactory, but I wonder whether anything is wrong with the craft-businesslogic.
Comments.UserDisplayName: Mitchell
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-26T17:46:37.620Z
Comments.Text: Very strange. I am the author of the Business Logic template, and everything you've posted looks like it should work as intended. I'm glad you got a solution worked out with pluginfactory.io! If you'd still like me to address the Business Logic issue, feel free to [post it on Github](https://github.com/doublesecretagency/craft-businesslogic/issues).
Comments.UserDisplayName: Lindsey D
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-27T22:14:57.420Z
Comments.Text: Thanks Lindsey. In the end I figured out a way to get what I needed without using a module, since I couldn't get the php/craft code working (I don't know anything about that so was a bit lost).
Comments.UserDisplayName: Mitchell
Tags: <controller>
Title: doublesecretagency business logic module template: 404 on example form action
ThreadText: # doublesecretagency business logic module template: 404 on example form action
  
  (Asked by: username_0 on 2020-02-24)
  
  I set up the business logic module template following these instructions:
  <https://doublesecretagency.github.io/craft-businesslogic/installation>
  
  The test works out well, so everything seems to be in order.
  
  However, when I add the example action to a form and submit it, I get a 404:
  
  Unable to resolve the request "business-logic/example/example-form-submit".
  
  How do I find and fix the underlying issue?
  
  EDIT: I tried setting up a module via <https://pluginfactory.io/> and that works like a charm.
  
  **Tags:** controller
  
  > **Comments:**
  > **username_1**: Are you logged in or logged out when you are submitting the form? Perhaps try enabling [anonymous access...](https://github.com/doublesecretagency/craft-businesslogic/blob/master/src/controllers/ExampleController.php#L39)  
  > **username_0**: Hi username_1, yes I am logged in as admin user. Even when enabling anonymous access it returns a 404. I've managed to solve my problem using the pluginfactory, but I wonder whether anything is wrong with the craft-businesslogic.  
  > **username_1**: Very strange. I am the author of the Business Logic template, and everything you've posted looks like it should work as intended. I'm glad you got a solution worked out with pluginfactory.io! If you'd still like me to address the Business Logic issue, feel free to [post it on Github](https://github.com/doublesecretagency/craft-businesslogic/issues).  
  > **username_0**: Thanks username_1. In the end I figured out a way to get what I needed without using a module, since I couldn't get the php/craft code working (I don't know anything about that so was a bit lost).  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2023-02-04. Score: 2
  
  The issue seems to be quite simple: the module is referenced incorrectly in the example code. The example action-input is:
  
  `<input type="hidden" name="action" value="business-logic/example/example-form-submit">`
  
  but it should be:
  
  `<input type="hidden" name="action" value="businesslogic/example/example-form-submit">`
  
  Omitting the dash in the "business-logic" name, since the module is being loaded as "businesslogic" instead.
  
  
  ---
  
  ### Answer by username_2 on 2020-02-24. Score: 1
  
  Did you remember to add the action as a hidden input (`<input type="hidden" name="action" value="business-logic/example/example-form-submit">`, rather than an `action` attribute on the form? And also use `method="post"` on the form.
  
  > **Comments:**
  > **username_0**: Yes, it's set up like that and I've tried via the {{ actionInput() }} as well.  
  
  ---
  
  