slick contact form php ajax

  You are currently not logged in. You can view the forums, but cannot post messages. Log In | Register

10-Aug-11 09:57
I am looking for a solution as focus or disable background (I'm not sure) when he jumps out the form. Surely this is set in the css but can not find it.
The second question concerns the character encoding - how to set encoding to utf-8?
When i sand the massag on the header ist "#as#$#" ....


PLS help....

[Edited by revolution on 10-Aug-11 09:07]
16-Aug-11 03:02
@revolution: You could try adding an onblur event handler to the form that then calls focus() on the first form field to bring the focus back to the form. Not sure how well it would work, but it's worth a try.

Where exactly do you want to set the character encoding?

--
Matt Doyle, Elated
16-Aug-11 03:10
Thanks Matt.
I'll try this.

My server character: iso-8859-2 and When i sand the massag on the header ist "#as#$#" .... I need to change the encoding to utf-8.
23-Aug-11 03:33
@revolution: I saw a great page on UTF-8 the other day that might help:

http://rentzsch.tumblr.com/post/9133498042/howto-use-utf-8-throughout-your-web-stack

--
Matt Doyle, Elated
29-Aug-11 08:19
Hello Matt,

I tried to put the tag

<form action="foo" accept-charset="UTF-8">...</form>
but has no effect.

I decided to try a tip from a colleague of mine put

$ headers .= PHP_EOL. 'Content-Type: text / html; charset = UTF-8';

The contents of the message is "UTF-8" but the name is not.

How can I resove this?
30-Aug-11 03:54
What are you trying to encode in UTF-8? The page? The email message? Browsers will send the form data using the page encoding.

Your HTTP header shouldn't have spaces in:


Content-Type: text/html; charset=UTF-8


--
Matt Doyle, Elated
30-Aug-11 10:04
Hello Matt,

I'm trying to modify the message that comes from the form my Post Office box. <meta charset = "utf-8"> html is correct and applied the tb of
<form meted action="foo" accept-charset="UTF-8"> ...</ form>
but I keep getting emails without the special characters like (~ 'ç'áàe´éè).

The only solution I got so far is
$headers .= PHP_EOL  . 'Content-Type: text/html; charset=UTF-8';

This only works on the content of the message.
in senderName EMAIL_SUBJECT and not working.

Thanks.
30-Aug-11 13:28
Hello Matt,

Is there any way this preg_replace to accept Latin characters?


$senderName = isset( $_POST['senderName'] ) ? preg_replace( "/[^\.\-\' a-zA-Z0-9]/", "", $_POST['senderName'] ) : "";
01-Sep-11 19:44
@xarkan: I guess you mean UTF-8 characters?

You have to be a bit careful with PHP's PCRE functions and UTF-8. PHP < 6 isn't very good at Unicode.

This page gives some useful tips:

http://www.phpwact.org/php/i18n/utf-8

--
Matt Doyle, Elated
04-Sep-11 19:33
Thanks Matt,

The article is very useful.
07-Sep-11 03:45
@xarkan: No problem - hope you got it working OK.

--
Matt Doyle, Elated

 
New posts
Old posts

Follow Elated