PDA

View Full Version : Return causing form not to work



tsquez
09-30-2010, 07:00 PM
I am building a wordpress theme that utilizes a theme options panel.

The theme has a area where someone can enter in their email address, and when they do a Thank You message displays.

One of the sections in the theme options panel allows the users to modify that message. Right now the message is formated like this:

"Thank you for your interest!<br />As soon as as we are ready we will send you an email with all the details."

and the page source shows this:


success: function() {
$('#right').html("<div id='submitted'></div>");
$('#submitted').html("Thank you for your interest!<br />As soon as as we are ready we will send you an email with all the details.")
.hide()
.fadeIn(1000, function() {

});

now the form functions properly the way it should and the thank you message appears accordingly when someone submits their email.

However, if the person modifies the message in the theme options panel and uses "Enter" for a return or line break the code looks like this:


success: function() {
$('#right').html("<div id='submitted'></div>");
$('#submitted').html("Thank you for your interest!

As soon as as we are ready we will send you an email with all the details.")
.hide()
.fadeIn(1000, function() {

});

and this causes the form not to function properly. The thank you message will not show up and the form doesnt submit.

Is there a way to fix the java code so a person can use "Enter" if they choose to? Any help is greatly appreciated. Thank you for your time.