Form not being stored to database and emails not having the correct info

  • Hi,

    I've recently taken over the running of a website and while I have everything up and running, when a customer fills in a form online, the email generated has the fields in the curly brackets still and no information is there. It's also not stored in the database. Any idea on how to fix. I've checked the logs and have debug mode on, but it makes no difference.



  • drewm

    Approved the thread.
  • Hi,

    I've just logged into the control panel, gone to Forms, clicked on the relevant form and there are no new responses. These are the settings attached. The emails I keep getting are exactly as the text including the word {restaurant}.

    I'm stumped why they're not storing them and why it's not adding them to an email.



  • Hello,

    Thanks for your response. I'm not exactly sure on what you mean, as I don't know where to find the form templates or how to edit these. The website has just been handed over to us, so am trying to work out how to use the system.



  • Maybe get in touch with whoever handed over the site. You'll need access to the web server, and know how to edit HTML.

    but from your screen shot it doesn't look like you are using an email template, as the message is right there in plain text. I wasn't aware that {values} could be used in that way. Are you running an old version of Perch?

  • I have got in touch with the person that handed over and they said to come on here. Are the templates stored as files on the website? I don't mind editing, I just want it working or removed.

  • Hi

    I've had a look at the live site for you and it appears that there are three forms: A general one and two restaurant ones. These two restaurant forms have hidden fields that will fill out the restaurant placeholders in the response. The main contact form doesn't have that field. If they are all posting to the same form inside Perch then you are going to just get that empty placeholder code if anyone posts to the general form.

    You need to either create a new instance of a form for the general form and take out that restaurant placeholder in the copy, or write some conditionals into the form so that you don't get any empty placeholders in the response.

    You can't use the control panel to sort this out. You will need to look at the template files. The form template file will probably be in /perch/template/forms/.

    Hope this helps,


  • I just need to know really how or where it is configured, where the templates send the information to the email.

    I've found the templates. I don't get why this would not work, as the forms seems properly configured.

  • If you turn on Perch Debug from your config.php, and go to the forms app, select your form and go to the form settings tab, at the bottom of the page, you'll see the debug info and you'll see a line like:

    Using template: /path/to/your/perch/site/perch/templates/content/your-template-name.html

    of course the path will be the path on your server and the 'your-template-name.html' will be the name of the template for the form.