Page 1 of 1

CGBetterForms questions + errors

Posted: Sat Aug 03, 2019 8:29 pm
by Cyc
CMS 2.2.10
PHP 7.1.9
CGBetterForms 1.9.9.1

question:
How to add the email, to which the form is sent?

error:
When "Display form inline" is set to true, I have this message:
Please specify a form name when calling CGBetterForms

When "Display form inline" is set to false, I have this message:
Could not find a field with name email in field list

I use localhost.

Template:

Code: Select all

{cgbf_form_errors assign='errors'}
{if !empty($errors)}
  <ul class="error">
  {foreach $errors as $err}
    <li>{$err}</li>
  {/foreach}
  </ul>
{/if}

<form class="contact-form">
     <label for="name">Name</label>
     <input id="name" name="name" type="text" placeholder="Name">

     <label for="phone">Phone</label>
     <input id="phone" name="phone" type="text" placeholder="Phone">

     <label for="mail">E-mail</label>
     <input id="mail" name="mail" type="text" placeholder="E-mail">

     <label for="comments">Message</label>
     <textarea id="comments" type="text" name="comments" placeholder="Message"></textarea>

  <div data-cgbf-captcha></div>

  <div class="submit">
    <button type="submit">Submit</button>
  </div>
</form>

Re: CGBetterForms questions + errors

Posted: Sat Aug 03, 2019 10:38 pm
by DIGI3
I think it needs to find a type="email" field in order for any of the email functionality to work.

Re: CGBetterForms questions + errors

Posted: Tue Aug 06, 2019 7:20 pm
by Cyc
Do I have to add input type email for sending form to my admin email?

Re: CGBetterForms questions + errors

Posted: Tue Aug 06, 2019 8:13 pm
by calguy1000
if you want to send the results via email to certain addresses you add a handler that will send the email and specify that address and the format for that email

i.e: "Email results to specified addresses".

Re: CGBetterForms questions + errors

Posted: Tue Aug 06, 2019 11:37 pm
by Cyc
Ok, I resolved the problem. SPAM :(