Modify contact page

I have attached the contact page for my theme:
Currently, it looks like this: http://www.elegantthemes.com/preview/PureType/contact/

Please tell me how I can modify the .php file so that "Name", "Email address", "Subject" and "Message" appear as labels, rather than inside the textfields.

Thanks! contact.txt
dshrenikAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

liveaspankajCommented:
Try this:
 
<?php session_start();
/*
Template Name: Contact Page
*/
?>

<?php the_post(); ?>
<?php 
	$et_ptemplate_settings = array();
	$et_ptemplate_settings = maybe_unserialize( get_post_meta($post->ID,'et_ptemplate_settings',true) );
	
	$fullwidth = isset( $et_ptemplate_settings['et_fullwidthpage'] ) ? (bool) $et_ptemplate_settings['et_fullwidthpage'] : (bool) $et_ptemplate_settings['et_fullwidthpage'];
	
	$et_regenerate_numbers = isset( $et_ptemplate_settings['et_regenerate_numbers'] ) ? (bool) $et_ptemplate_settings['et_regenerate_numbers'] : (bool) $et_ptemplate_settings['et_regenerate_numbers'];
		
	$et_error_message = '';
	$et_contact_error = false;
	
	if ( isset($_POST['et_contactform_submit']) ) {
		if ( !isset($_POST['et_contact_captcha']) || empty($_POST['et_contact_captcha']) ) {
			$et_error_message .= '<p>' . __('Make sure you entered the captcha. ','PureType') . '</p>';
			$et_contact_error = true;
		} else if ( $_POST['et_contact_captcha'] <> ( $_SESSION['et_first_digit'] + $_SESSION['et_second_digit'] ) ) {			
			$et_numbers_string = $et_regenerate_numbers ? __('Numbers regenerated.') : '';
			$et_error_message .= '<p>' . __('You entered the wrong number in captcha. ','PureType') . $et_numbers_string . '</p>';
			
			if ($et_regenerate_numbers) {
				unset( $_SESSION['et_first_digit'] );
				unset( $_SESSION['et_second_digit'] );
			}
			
			$et_contact_error = true;
		} else if ( empty($_POST['et_contact_name']) || empty($_POST['et_contact_email']) || empty($_POST['et_contact_subject']) || empty($_POST['et_contact_message']) ){
			$et_error_message .= '<p>' . __('Make sure you fill all fields. ','PureType') . '</p>';
			$et_contact_error = true;
		}
		
		if ( !is_email( $_POST['et_contact_email'] ) ) {
			$et_error_message .= '<p>' . __('Invalid Email. ','PureType') . '</p>';
			$et_contact_error = true;
		}
	} else {
		$et_contact_error = true;
		if ( isset($_SESSION['et_first_digit'] ) ) unset( $_SESSION['et_first_digit'] );
		if ( isset($_SESSION['et_second_digit'] ) ) unset( $_SESSION['et_second_digit'] );
	}
	
	if ( !isset($_SESSION['et_first_digit'] ) ) $_SESSION['et_first_digit'] = $et_first_digit = rand(1, 15);
	else $et_first_digit = $_SESSION['et_first_digit'];
	
	if ( !isset($_SESSION['et_second_digit'] ) ) $_SESSION['et_second_digit'] = $et_second_digit = rand(1, 15);
	else $et_second_digit = $_SESSION['et_second_digit'];
	
	if ( !$et_contact_error ) {
		$et_email_to = ( isset($et_ptemplate_settings['et_email_to']) && !empty($et_ptemplate_settings['et_email_to']) ) ? $et_ptemplate_settings['et_email_to'] : get_site_option('admin_email');
				
		$et_site_name = MULTISITE ? $current_site->site_name : get_bloginfo('name');	
		wp_mail($et_email_to, sprintf( '[%s] ' . esc_html($_POST['et_contact_subject']), $et_site_name ), esc_html($_POST['et_contact_message']),'From: "'. esc_html($_POST['et_contact_name']) .'" <' . esc_html($_POST['et_contact_email']) . '>');
		
		$et_error_message = '<p>' . __('Thanks for contacting us','PureType') . '</p>';
	}
?>

<?php get_header(); ?>

<div id="container">
<div id="left-div">
    
    <!--Start Post-->
    <div class="post-wrapper">
        <h1 class="post-title"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s','PureType'), get_the_title()) ?>">
            <?php the_title(); ?></a></h1>
        <div style="clear: both;"></div>
		<?php if (get_option('puretype_page_thumbnails') == 'on') { include(TEMPLATEPATH . '/includes/thumbnail.php'); } ?>
        <?php the_content(); ?>
		<div id="et-contact">

			<div id="et-contact-message"><?php echo($et_error_message); ?> </div>
			
			<?php if ( $et_contact_error ) { ?>
				<form action="<?php echo(get_permalink($post->ID)); ?>" method="post" id="et_contact_form">
					<div id="et_contact_left">
						<p class="clearfix">
						<label><?php _e('Name','PureType'); ?></label>
							<input type="text" name="et_contact_name" value="<?php if ( isset($_POST['et_contact_name']) ) echo esc_attr($_POST['et_contact_name']); ?>" id="et_contact_name" class="input" />
						</p>
						
						<p class="clearfix">
						<label><?php _e('Email Address','PureType'); ?></label>
							<input type="text" name="et_contact_email" value="<?php if ( isset($_POST['et_contact_email']) ) echo esc_attr($_POST['et_contact_email']);  ?>" id="et_contact_email" class="input" />
						</p>
						
						<p class="clearfix">
						<label><?php _e('Subject','PureType'); ?></label>
							<input type="text" name="et_contact_subject" value="<?php if ( isset($_POST['et_contact_subject']) ) echo esc_attr($_POST['et_contact_subject']);  ?>" id="et_contact_subject" class="input" />
						</p>
					</div> <!-- #et_contact_left -->
					
					<div id="et_contact_right">
						<p class="clearfix">
							<?php 
								_e('Captcha: ','PureType');	
								echo '<br/>';
								echo esc_attr($et_first_digit) . ' + ' . esc_attr($et_second_digit) . ' = ';
							?>
							<input type="text" name="et_contact_captcha" value="<?php if ( isset($_POST['et_contact_captcha']) ) echo esc_attr($_POST['et_contact_captcha']); ?>" id="et_contact_captcha" class="input" size="2" />
						</p>
					</div> <!-- #et_contact_right -->
					
					<div class="clear"></div>
					
					<p class="clearfix">
						<label><?php  _e('Message','PureType'); ?></label>
						<textarea class="input" id="et_contact_message" name="et_contact_message"><?php if ( isset($_POST['et_contact_message']) ) echo esc_attr($_POST['et_contact_message']); ?></textarea>
					</p>
						
					<input type="hidden" name="et_contactform_submit" value="et_contact_proccess" />
					
					<input type="reset" id="et_contact_reset" value="<?php _e('Reset','PureType'); ?>" />
					<input class="et_contact_submit" type="submit" value="<?php _e('Submit','PureType'); ?>" id="et_contact_submit" />
				</form>
			<?php } ?>
		</div> <!-- end #et-contact -->
		<div style="clear: both;"></div>
		<?php if (get_option('puretype_show_pagescomments') == 'on') { ?>
			<?php comments_template('', true); ?>
		<?php }; ?>	
    </div>
    <?php if($fullwidth) echo ('</div>');?>
</div>
<!--Begin Sidebar-->
<?php if (!$fullwidth) get_sidebar(); ?>
<!--End Sidebar-->
<!--Begin Footer-->
<?php get_footer(); ?>
<!--End Footer-->
</body>
</html>

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
liveaspankajCommented:
thanks :)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
WordPress

From novice to tech pro — start learning today.