Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #4735

    I am trying to change some of the content of the contact form, but or some reason it’s not working… Here’s the code from template_contact.php:

    <p class="<?php if (isset($the_nameclass)) echo $the_nameclass; ?>" ><input name="yourname" class="text_input is_empty" type="text" id="name" size="20" value='<?php if (isset($the_name)) echo $the_name?>'/><label for="name"><?php _e('Your Name','habitat'); ?>*</label>


    <p class="<?php if (isset($the_emailclass)) echo $the_emailclass; ?>" ><input name="email" class="text_input is_email" type="text" id="email" size="20" value='<?php if (isset($the_email)) echo $the_email ?>' /><label for="email"><?php _e('E-Mail','habitat'); ?>*</label></p>

    <p><input name="phone" class="text_input" type="text" id="phone" size="20" value="<?php if (isset($the_phone)) echo $the_website?>"/><label for="phone"><?php _e('Phone','habitat'); ?></label></p>

    <p><input name="time" class="text_input" type="text" id="time" size="20" value="<?php if (isset($the_time)) echo $the_time?>"/><label for="time"><?php _e('Best Time to Call','habitat'); ?></label></p>

    <label for="message" class="blocklabel"><?php _e('Your Message','habitat'); ?>*</label>

    <p class="<?php if (isset($the_messageclass)) echo $the_messageclass; ?>"><textarea name="message" class="text_area is_empty" cols="40" rows="7" id="message" ><?php if (isset($the_message)) echo $the_message ?></textarea>

    <input name="username" value="" id="username" class="username"/>



    <input type="hidden" id="myemail" name="myemail" value="<?php echo $email_adress_reciever; ?>" />

    <input type="hidden" id="myblogname" name="myblogname" value='<?php echo $name_of_your_site; ?>' />

    <input name="Send" type="submit" value="<?php _e('Send','habitat'); ?>" class="button" id="send" size="16"/></p>

    <?php } else { ?>

    <p><h3><?php _e('Your message has been sent!','habitat'); ?> </h3> <?php _e('Thanks for getting in touch. We will be in touch soon...','habitat'); ?> </p>

    <?php } ?>


    The new form fields seem to be working fine, but for some reason the thank you message is not displaying correctly. see:

    Also, when I receive the email there are some empty fields that I don’t want in there – Website: & username: – How do I get rid of these?




    1) I checked the welcome message but it display fine for me:

    2) To remove the username and website field delete following code in template_contact.php:

    <input name="username" value="" id="username" class="username"/>


    <p><input name="website" class="text_input" type="text" id="website" size="20" value="<?php if (isset($the_website))  echo $the_website?>"/><label for="website"><?php _e('Website','habitat'); ?></label></p>

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Comment Form Changes’ is closed to new replies.