Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > RocketCake
Forms how to make required fields

johannes
Registered User
Quote
2018-12-12 14:25:06

Hi.
On my website the form works fine as copied from the help file.
But you can send empty forms and I have people who forget to write their mail contact. Is there an easy way to change the code so I can make the field requested ?

http://www.alsaceimage.fr/contac...


niko
Moderator
Quote
2018-12-14 08:04:47

Be sure that the name of the text field of your form is set to "email" and then use this code instead:


$text = "";

if ($_POST["email"] == "")
{
echo 'You forgot to enter your email adress!';
}
else
{
foreach($_POST as $name => $value)
{
$text .= "$name : $value\n";
}

if ($text != "")
{
echo 'Thanks for contacting us.';
mail("youremail@example.com", "Contact form request", $text);
}
}



johannes
Registered User
Quote
2018-12-18 10:58:16

Thank you !...


izzo
Guest
Quote
2018-12-21 13:20:07

Johannes...please tell me how you make the navigation (menu) in that site...i mean in mobile view how you make the menu to change from horizontal to vertical, in desctop version the menu is horizontal, in mobile it change to vertical, how you did it ? you did with rocketcake ?....thanks )))


erik
Registered User
Quote
2018-12-22 05:26:03

from what I can see: Yes, that's made with Rocketcake. He probably made that menu twice (once vertical and once horizontal) and uses a breakpoint to make it visible/invisible for specific sizes.


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Internat?onal" (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