• <?php if ('open' == $post->comment_status) : ?>
    	<div id="comment-form">
    
    	<?php if ( get_option('comment_registration') && !$user_ID ) : ?>
    		<p>You must be <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>">logged in</a> to post a comment.</p>
    	<?php else : ?>
    		<?php if ( $user_ID ) : ?>
    
    			<p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="Log out of this account">Log out &raquo;</a></p><br />
    
    		<?php else : ?>
    	<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
    		<div id="comment-personaldetails">
    			<p>
    				<input type="text" name="name" id="name" value="<?php echo $comment_author; ?>" size="30" tabindex="1">
    				<label for="name"><strong>Name</strong><?php if ($req) echo " (required)"; ?></label>
    			</p>
    			<p>
    				<input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="30" tabindex="2">
    				<label for="email"><strong>Email</strong><?php if ($req) echo " (required, will not be published)"; ?></label>
    			</p>
    			<p>
    				<input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="30" tabindex="3">
    				<label for="url"><strong>Website</strong></label>
    			</p>
    		</div>
    		<?php endif; ?>
    		<p>Post your comment:
    			<textarea name="content" id="content" cols="60" rows="10" tabindex="4">
    			</textarea>
    		</p>
    		<p>
    			<input name="submit" type="submit" id="submit" tabindex="5" value="Submit" />
    			<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
    		</p>
    		<?php do_action('comment_form', $post->ID); ?>
    		<div class="clear"></div>
    
    	</form>
    </div>
    <?php endif; // If registration required and not logged in ?>
    
    <?php endif;?>

    Somehow, when I click the submit button, the page does not do anything. Have a missed anything anywhere?

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