与html相互呼应的PHP代码

与html相互呼应的PHP代码,php,wordpress,shortcode,Php,Wordpress,Shortcode,我一直在努力在模板中为表单添加内容锁定器,我成功了,但表单获取了一些php值,所以echo中有php代码。不知道我该怎么做 有人能帮忙吗?我挣扎了10个小时,无法找到解决办法 <? $locker='[ihc-hide-content ihc_mb_type="block" ihc_mb_who="all" ihc_mb_template="1"] <form id="contact" type="post" action="" >

我一直在努力在模板中为表单添加内容锁定器,我成功了,但表单获取了一些php值,所以echo中有php代码。不知道我该怎么做

有人能帮忙吗?我挣扎了10个小时,无法找到解决办法

 <?
    $locker='[ihc-hide-content ihc_mb_type="block" ihc_mb_who="all" ihc_mb_template="1"]
                <form id="contact" type="post" action="" >  
                    <span class="contact-name">
                        <input type="text"  name="contactName" id="contactName" value="" class="input-textarea" placeholder="<?php _e("Name*", "themesdojo"); ?>" />
                    </span>

                    <span class="contact-email">
                        <input type="text" name="email" id="email" value="" class="input-textarea" placeholder="<?php _e("Email*", "themesdojo"); ?>" />
                    </span>

                    <span class="contact-message">
                        <textarea name="message" id="message" cols="8" rows="8" ></textarea>
                    </span>

                    <span class="contact-test">
                        <p style="margin-top: 20px;"><?php _e("Human test. Please input the result of 5+3=?", "themesdojo"); ?></p>
                        <input type="text" onfocus="if(this.value=='')this.value='';" onblur="if(this.value=='')this.value='';" name="answer" id="humanTest" value="" class="input-textarea" />
                    </span>

                    <input type="text" name="receiverEmail" id="receiverEmail" value="<?php echo $wpjobus_job_email; ?>" class="input-textarea" style="display: none;"/>

                    <input type="hidden" name="action" value="wpjobContactForm" />
                    <?php wp_nonce_field( 'scf_html', 'scf_nonce' ); ?>

                    <input style="margin-bottom: 0;" name="submit" type="submit" value="<?php _e( 'Send Message', 'themesdojo' ); ?>" class="input-submit">  

                    <span class="submit-loading"><i class="fa fa-refresh fa-spin"></i></span>

                </form>
            [/ihc-hide-content]'; 
    echo do_shortcode( $locker );
?>

只需输入
php
变量即可

        $locker='[ihc-hide-content ihc_mb_type="block" ihc_mb_who="all" ihc_mb_template="1"]                            
        <form id="contact" type="post" action="" >  

                        <span class="contact-name">
                            <input type="text"  name="contactName" id="contactName" value="" class="input-textarea" placeholder="'._e("Name*", "themesdojo").'" />
                        </span>

                        <span class="contact-email">
                            <input type="text" name="email" id="email" value="" class="input-textarea" placeholder="'._e("Email*", "themesdojo").'" />
                        </span>

                        <span class="contact-message">
                            <textarea name="message" id="message" cols="8" rows="8" ></textarea>
                        </span>

                        <span class="contact-test">
                            <p style="margin-top: 20px;">'._e("Human test. Please input the result of 5+3=?", "themesdojo").'</p>
                            <input type="text" onfocus="if(this.value=="")this.value="";" onblur="if(this.value=="")this.value="";" name="answer" id="humanTest" value="" class="input-textarea" />
                        </span>

                        <input type="text" name="receiverEmail" id="receiverEmail" value="'.$wpjobus_job_email.'" class="input-textarea" style="display: none;"/>

                        <input type="hidden" name="action" value="wpjobContactForm" />
                        '.wp_nonce_field( 'scf_html', 'scf_nonce' ).'

                        <input style="margin-bottom: 0;" name="submit" type="submit" value="'._e( 'Send Message', 'themesdojo' ).'" class="input-submit">  

                        <span class="submit-loading"><i class="fa fa-refresh fa-spin"></i></span>

                    </form> [/ihc-hide-content]'; 
                    echo do_shortcode( $locker );
$locker='[ihc hide content ihc_mb_type=“block”ihc_mb_who=“all”ihc_mb_template=“1”]

。(“人体测试。请输入5+3=?”的结果,“themesdojo”)。'

“.wp_nonce_字段('scf_html','scf_nonce')。” [/ihc隐藏内容]; echo do_短代码($locker);
第25行包含被解释为$locker变量一部分的PHP

<?php wp_nonce_field( 'scf_html', 'scf_nonce' ); ?>

那么问题出在哪里?