form:message sent successfully and empty field

resolved (4 posts) (2 voices)

  1. frigolife
    Member

    Hi Elliot
    I'm using html-css infocus 1.1 version

    1° question:
    when I send a comment, the page shows the success message “Thanks! Your email was successfully sent.”
    How can I change this message? (I want to translate it)

    2°question:
    There are two forms:
    the first one (in the footer), in case of empty field, shows "!" (good)
    the second one, in the main content, simply highlights the edge of the field
    How can I change the second one (like the first one)?

    thanks in advance
    paolo

    Posted 5 months ago #
  2. Elliott
    Support

    Hello frigolife,

    1. You can find that text in the file "submit.php". I think for the HTML/CSS version it's in the /infocus/lib/ folder.

    2. I'm not sure I understand, if possible send us a link to your site so we can take a closer look.

    Posted 5 months ago #
  3. frigolife
    Member

    Hi
    Here is the content of submit_footer.php (I cant' see "Thanks! Your email was successfully sent"!)

    <?php
    /**
    * Contact Widget Form Submit
    */

    $emailTo = 'info@frigoliascensori.it';

    //Check to see if the honeypot captcha field was filled in
    if(trim($_POST['checking']) !== '') {
    $captchaError = true;
    } else {

    //Check to make sure that the name field is not empty
    if(trim($_POST['contactNameWidget']) === '') {
    $nameError = 'Inserisci il tuo nome.';
    $hasError = true;
    } else {
    $name = trim($_POST['contactNameWidget']);
    }

    //Check to make sure sure that a valid email address is submitted
    if(trim($_POST['emailWidget']) === '') {
    $emailError = 'Inserisci il tuo indirizzo email.';
    $hasError = true;
    } else if (!eregi("^[A-Z0-9._%-]+@[A-Z0-9._%-]+\.[A-Z]{2,4}$", trim($_POST['emailWidget']))) {
    $emailError = 'Inserisci un indirizzo email valido.';
    $hasError = true;
    } else {
    $email = trim($_POST['emailWidget']);
    }

    //Check to make sure comments were entered
    if(trim($_POST['commentsWidget']) === '') {
    $commentError = 'Inserisci il testo del messaggio.';
    $hasError = true;
    } else {
    if(function_exists('stripslashes')) {
    $comments = stripslashes(trim($_POST['commentsWidget']));
    } else {
    $comments = trim($_POST['commentsWidget']);
    }
    }

    //If there is no error, send the email
    if(!isset($hasError)) {

    $subject = 'Richiesta informazioni dal sito da parte di '.$name;
    $sendCopy = trim($_POST['sendCopy']);
    $body = "Nome: $name \n\nEmail: $email \n\nRichiesta: $comments";
    $headers = 'From: frigoliascensori.com <'.$emailTo.'>' . "\r\n" . 'Reply-To: ' . $email;

    mail($emailTo, $subject, $body, $headers);

    if($sendCopy == true) {
    $subject = 'You emailed Your Name';
    $headers = 'From: Your Name <noreply@frigoliascensori.com>';
    mail($email, $subject, $body, $headers);
    }

    $emailSent = true;

    }
    }
    ?>

    2: the link
    http://www.frigoliascensori.com/prova/ffsite/form.html
    try to send first (in the main body content) and second form (in the footer) with empty field
    :)

    Posted 5 months ago #
  4. Elliott
    Support

    Try looking in your /js/custom.js file.

    As for the error you'll need to add this in your style.css file,

    .inputError, input.inputError[type="text"] {
        border: 1px solid #888888;
    }

    And add a background image instead of changing the border color.

    Posted 5 months ago #

Reply

You must log in to post.

Construct WordPress Theme
Construct wordpress theme
Myriad WordPress Theme
Myriad wordpress theme
Method WordPress Theme
Method wordpress theme
Fusion WordPress Theme
Fusion wordpress theme
Elegance WordPress Theme
Elegance wordpress theme
Echelon WordPress Theme
Echelon wordpress theme
Dejavu WordPress Theme
Dejavu wordpress theme
Modular WordPress Theme
Modular wordpress theme