Form Module - view/_blocks - and submit button confusion.
  • Hello,

    I am trying to set out the template block file correctly. As you can see I am using Bootrstrap (v4) here to layout the form, bit of a kludge to get it work, but all good so far.

    However, if I complete all the fields - Excluding the recaptcha object (v2 installed) and hit submit no warns that I have yet to complete the recaptcha appear - the page goes ahead and reloads.

    /* i've used the form slug here in the action */

    <?php foreach($fields as $field) : ?>


    <?php endforeach; ?>

  • Is there a "error" flash data being sent to the page that you can display or do you have something like the following a the top of your page:
  • This is in fact quite tricky to test because the Recaptcha displays 'ERROR for site owner: Invalid domain for site key.' Despite adding 'localhost' and 'dev' domains into the 'admin console' on the relevant settings page. So maybe its meant to act that way?

    g-recaptcha-response: {empty}

    Whatever the case maybe no email is being received.

    EDIT: Just looked under Form Entries in Fuel and there is any entry from Friday, but none from this Morning suggesting something work :S
  • FYI if I turn off Recaptcha altogether and use honeypot the form still does not submit or send anything :(
  • I would test to see if it's making it to the forms controller on submit and then debug from there. The forms controllers is located at fuel/modules/controllers/Forms.php.

    Also, is the form embedded on a page created in the CMS. If so, turn of page caching for that page.
  • Still in development at the moment, so no caching turned on.

    No, it's not reaching the CI_Controller class.
  • Any further ideas?

    In principle is this correct? (sorry I just noticed my original post was missing html tags)

    <form method="POST">
    <div class="row">
    <?php foreach($fields as $field) : ?>
    <div class="col-12 col-sm-6">
    <?php endforeach; ?>
    <div class="col-12 col-md-6">
    <input type="submit" class="btn btn-primary btn-lg btn-block" value="Request a Call Back">
  • Ah... you need to put in the proper "action" parameter in your form tag.
  • Brilliant, thought it would be something simple, thank you.
  • At the moment I am not receiving the email related to a completed form on local/dev server. How programmatically does it go about sending the email?
  • So Form Display is set to 'block'.. Block view is set to 'business-call-back' in the 'forms' module.

    In the Actions tab I have an empty Form action field, lorem ipsum in 'After submit text' (which doesn't show anywhere), my email address in Email recipients, a subject heading and an email message containing the words 'test message'.

    And a Return URL in the field.


    I have a feeling nothing in this Tab is missing used. :S
  • This is hard work, cannot even find out how to change the Content-Type to text/html
  • Now the To: field is empty :S
  • To check where things may be getting hung up I'd debug Fuel_forms::notify() method around line 1086 in fuel/forms/modules/forms/libraries/Fuel_forms.php. That method is what is used to send out the email using CI's Email class.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!