当前位置: 动力学知识库 > 问答 > 编程问答 >

WordPress Jupiter Theme - Customize Quick Message

问题描述:

I would like to add two fields in the quick contact form in Jupiter themes.So far I am able to add a custom fields in general.php. For testing purposes, I did not create a child theme for this, I just want to make it working before creating one.No errors on submit, but does not submit the message to the recipient email.Any idea how to make it work? Is there any file I need to edit? Here is the code for quick contact form

 if ( !function_exists( 'mk_quick_contact' ) ) {

function mk_quick_contact() {

global $mk_options;

if ( $mk_options['disable_quick_contact'] != 'true' ) return false;

$captcha_quick_contact = isset($mk_options['captcha_quick_contact']) ? $mk_options['captcha_quick_contact'] : 'true';

$id = mt_rand( 99, 999 );

$tabindex_1 = $id;

$tabindex_2 = $id + 1;

$tabindex_3 = $id + 2;

$tabindex_4 = $id + 3;

$tabindex_5 = $id + 4;

$tabindex_6 = $id + 5;

?>

<div class="mk-quick-contact-wrapper">

<a href="#" class="mk-quick-contact-link"><i class="mk-icon-envelope"></i></a>

<div id="mk-quick-contact">

<div class="mk-quick-contact-title"><?php echo $mk_options['quick_contact_title']; ?></div>

<p><?php echo $mk_options['quick_contact_desc']; ?></p>

<form class="mk-contact-form" method="post" novalidate="novalidate">

<input type="text" placeholder="<?php _e( 'Name*', 'mk_framework' ); ?>" required="required" id="contact_name" name="contact_name" class="text-input" value="" tabindex="<?php echo $tabindex_1; ?>" />

<input type="email" required="required" placeholder="<?php _e( 'Email*', 'mk_framework' ); ?>" id="contact_email" name="contact_email" class="text-input" value="" tabindex="<?php echo $tabindex_2; ?>" />

<textarea placeholder="<?php _e( 'Message*', 'mk_framework' ); ?>" required="required" id="contact_content" name="contact_content" class="textarea" tabindex="<?php echo $tabindex_3; ?>"></textarea>

<!--added code -->

<input type="number" min="12" max="12" placeholder="<?php _e( 'Contact Number', 'mk_framework' ); ?>" id="contact_number" name="contact_number" class="text-input" value="" tabindex="<?php echo $tabindex_5; ?>" />

<input type="date" required="required" placeholder="Available Date/Time" id="available_date" name="available_date" class="text-input" value="" tabindex="<?php echo $tabindex_6; ?>" />

<!--end-->

<?php if($captcha_quick_contact == 'true') { ?>

<input placeholder="<?php _e( 'Enter Captcha', 'mk_framework' ); ?>" type="text" name="captcha" class="captcha-form text-input full" required="required" autocomplete="off" />

<a href="#" class="captcha-change-image"><?php _e( 'Not readable? Change text.', 'mk_framework' ); ?></a>

<img src="<?php echo THEME_DIR_URI; ?>/captcha/captcha.php" class="captcha-image" alt="captcha txt"> <br/>

<?php } ?>

<div class="btn-cont">

<button tabindex="<?php echo $tabindex_4; ?>" class="mk-progress-button mk-contact-button shop-flat-btn shop-skin-btn" data-style="move-up">

<span class="mk-progress-button-content"><?php _e( 'Send', 'mk_framework' ); ?></span>

<span class="mk-progress">

<span class="mk-progress-inner"></span>

</span>

<span class="state-success"><i class="mk-moon-checkmark"></i></span>

<span class="state-error"><i class="mk-moon-close"></i></span>

</button>

</div

<input type="hidden" value="<?php echo $mk_options['quick_contact_email']; ?>" name="contact_to"/>

</form>

<div class="bottom-arrow"></div>

</div>

</div>

<?php

}

}

分享给朋友:
您可能感兴趣的文章:
随机阅读: