I have a form created with AM forms that on submission does nothing. It doesn't go to the redirect url and nothing is saved to the database. Not sure what I am missing.

Here is my simplified code:

{% set form = craft.amForms.getForm('clubMembershipApplication') %}

<form method="post" accept-charset="UTF-8" class="form-horizontal col-sm-8 col-sm-offset-2 bv-form">
  {{ getCsrfInput() }}

  {# This should always be here! #}
  <input type="hidden" name="action" value="amForms/submissions/saveSubmission">

  {# Insert your forms handle. #}
  <input type="hidden" name="handle" value="{{ form.handle }}">

  {# Optional: Redirect URL. Will redirect to current page by default. #}
  <input type="hidden" name="redirect" value="membership/thankyou">

  various fields here

  <div class="submit-btn-container col-sm-8 col-sm-offset-4">
      <input type="submit" value="Submit" class="solo-btn btn">
  • Are submissions enabled on the form in the control panel? – Cavell Blood Nov 9 '17 at 15:40
  • Also, have you tried {{ dump(form) }} to see what it contains or {{ form | length }} to see if anything is being set? – Cavell Blood Nov 9 '17 at 15:41
  • Actually form is being set properly if you are seeing the form in the first place. Otherwise Craft might give you an error because it wouldn't be able to access handle if {{ form.handle }} if it were null. – Cavell Blood Nov 9 '17 at 15:43
  • @cavellblood save submissions is enabled. And {{ form | length }} outputs a number – CreateSean Nov 9 '17 at 16:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.