Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > RocketCake
Contact Form

bobh
Registered User
Quote
2022-11-05 12:48:56

I have probably jumped in too far but here goes.

I have followed the user guide for setting up a Contact page.
I mistakenly forgot to add my email address but the form was displayed correctly on my site. I have many other php pages on my site so although I don't fully understand them they work!
Obviously pressing SEND doesn't send an email but I do get the Thank you message.
On changing the php email to the correct one in the phpCode form and upload the file I receive an error

Parse error: syntax error, unexpected token "for", expecting "," or ";" in /customers/1/1/e/bobhewitt.co.uk/httpd.www/contact.php on line 87

What am I doing wrong?

Using One.com (php 8.1)


niko
Moderator
Quote
2022-11-06 06:50:55

Sounds like you have a typo somewhere. Be sure you have written the code exactly as in the documentation.

If you can't spot the problem you can send the .rcd file to me and I'll have a look (see on this page support -> contact, there is also an email address written on there)


bobh
Registered User
Quote
2022-11-07 11:23:48

@niko

Thanks for the tip about my Mac changing the quotes to a non php compliant text. I found the setting in System Settings/Keyboard/Text Input/Edit/ and switching off "use smart quotes and dashes" - not so smart for php!

The contact.php no longer gives a php error message but I have yet to receive an email - sometimes there is a delay.


niko
Moderator
Quote
2022-11-07 13:45:25

This depends on your hosting provider. If no or only sometimes a mail get through then your website hosting setup might have some problem.


micaelo
Registered User
Quote
2022-11-07 13:59:05

If your email client is set to detect spam check the junk or spam folder. It may well be that the emails from your contact form are there.

That's what happened to me when I made a series of tests with my contact form. My email client (Thunderbird) let pass the first ones but then decided it was junk.


bobh
Registered User
Quote
2022-11-07 17:40:52

I have four different email addresses that I use for different purposes - 2 x BT, 1 x gmail and one on my hosts system but all combinations don't receive an email either direct into inbox or any spam/junk etc folders. A little disappointed at present but I can use contact.html if need be.


niko
Moderator
Quote
2022-11-08 08:16:28

Yes, that sounds like there is something wrong with your webhost sending mails via php. Usually it works nicely without any problems.


bobh
Registered User
Quote
2022-11-08 09:57:32

@ niko

Seeing your last message I tried to ask One.com the question of why sending php emails don't work on php8.1

All they gave me was an auto reply with this link.

https://www.php.net/manual/en/function.mail.php

Way beyond my comprehension I am afraid and wondered if there is a solution in the link?


micaelo
Registered User
Quote
2022-11-08 10:45:35

As most web hosters so One.com offers an own contact form. They call it FormMail and the code can be downloaded here: https://help.one.com/hc/en-us/ar...
Comparing this code with the RocketCake contact form code could possibly help find the reason why the RC contact form does not work at One.com.


micaelo
Registered User
Quote
2022-11-08 13:27:46

Further to the above:

It looks like you can use the One.com FormMail in RocketCake as well. The setup procedure, however, would be different.

Do not rename the page which is going to host the contact form into .php, and instead of inserting "Web Form" insert "HTML Code". Then right-click, select "Edit Code ..." and paste the above linked code.

After that you can style the form as you like and, importantly, you will have to customize the code following the instruction given in the One.com help page. (But that's something you would have to do with the RC contact form as well.)


bobh
Registered User
Quote
2022-11-08 14:56:25

@ micaelo
@niko

My thanks for checking out my One.com contact form query.

I have now successfully created a page on my site within Rocketcake that sends out an email. I needed to create a second page 'thanks.html' that acknowledges the request with thanks.

http://www.bobhewitt.co.uk (still WIP)

Bob


bobh
Registered User
Quote
2022-11-09 10:39:11

Seems the One.com script on my Contact page is attracting many USA medical companies. Emails mentioning the contact form are arriving in inbox rather than spam/junk. I might have to abandon that idea :(


micaelo
Registered User
Quote
2022-11-09 15:46:13

At least you know your contact form works.
At my former employer we would have called this "proven successful".


raimcomputi
Registered User
Quote
2022-11-09 20:41:14

A contact form without effective spam protection can be forgotten nowadays. In the beginning I had just such a simple form without any protection. Within a few days my inbox was full of spam. A honey pot brought a first improvement. But only with a proper contact form, with Captcha, or at least a security question solved 99% of the spam problem for me.


bobh
Registered User
Quote
2022-11-09 22:54:38

@raimcomputi

What is a honey pot?

Is it some html code that I can add like this?

<input name="website" type="text" class="website"/>

Do I need to add something between the three sets of quotes?


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Internatio?al" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact