Hi everyone!
I’m sorry my English is bad.
I have a problem with my e-mail form.
When I am trying to write feedback e-mail from my web, the name and message in fields stay grey. Like a “placeholder text” and I can’t send them.
But If I chose them from suggestion box from my browser the form work correct!
I don’t see anything obvious in the code posted, other than the absence of a method and action in the form element, which would affect only the post processing of the form. And the absence of labels on the inputs which may affect accessibility in some way.
Is there any additional code that may be affecting things, such as CSS or javascript?
[aside]
A hidden input does not need display none to hide it, it won’t display by default.
But really, if you are using this to hide your email address from spammers, it is not really hidden because it’s visible in the source code.
To hide it, it would be better defined in the PHP where users can’t see it:-
Please be warry the PHP Mail() code is no longer a safe method as there has been evidence of hackers blacklisting your email address to a point where large providers such as Gmail and Yahoo consider this as spam and prevents user from sending anything.
PHPMailer has become very popular in has become more simple to use…
and yes the use of adding your email to html side can be seen with source codes so there has been uses where they captcha or simply hidding your email inside the php section since spam bots can not read php as it is not from end developement but there is also uses where javascript that can be used its basically depends on how you implement your code.
also remove unneccessary code such as the blank value="".
please also validate your code on the php side such as checking for blank input fields and the correct characters for example the email has its own validate on but anyone can use a bogus email address so you need to send a request to check if the email address exists or the text field shouldnt be able to contain content such as </>"’ etc only text.
and simply validate the message to also not contain those html characters since thats what makes it prone to hacking unless your making an email related topic with those codes consider convert those elements into just visible text there is alot to consider when using php mail I know the frustration lol.
anyway a good start but try to avoid using php mail() go for phpmailer and the other php coders.