1

我在我的注册表单中使用Calendly集成插件,我想检查日程安排是否已确认。

以下是我的完整代码。

<div class="row">
<div class="col-md-8 col-md-offset-2">
    <form id="msform" action="<?php echo get_permalink(24); ?>" method="post">

        <fieldset>
            <h2 class="fs-title">Personal Details</h2>
            <h3 class="fs-subtitle">Tell us something more about you</h3>
            <input type="text" class="first-input" id="first_name" name="fname" placeholder="First Name"/>
            <input type="text" class="second-input" name="lname" id="last_name" placeholder="Last Name"/>
            <input type="text" name="dob" id="dob" placeholder="D.O.B"/>
            <input type="email" name="email" id="email" placeholder="Your Email"/>
            <input type="text" name="phone" placeholder="Your telephone"/>


            <select name="about_us" id="select_opp">
                <option value="How did you hear about us?" selected="selected">How did you hear about us?</option>
                <option value="Through Web">Through Web</option>
                <option value="Friend">Friend</option>
            </select>
            <!-- Calendly inline widget begin -->
                <div class="calendly-inline-widget" data-url="https://calendly.com/tete" style="min-width:320px;height:400px;"></div>
                <script type="text/javascript" src="https://assets.calendly.com/assets/external/widget.js"></script>
                <!-- Calendly inline widget end -->
                <?php
                $ch = curl_init();
                curl_setopt($ch, CURLOPT_URL, "https://calendly.com/api/v1/echo");
                curl_setopt($ch, CURLOPT_HTTPHEADER, array(
                    "X-TOKEN: OBAMMHKFMHNN27F6ZUCS52RPDCS7GKWP",
                  ));
                curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
                curl_setopt($ch , CURLOPT_RETURNTRANSFER, true);
                curl_setopt($ch , CURLOPT_POST, true);
                curl_setopt($ch , CURLOPT_POSTFIELDS, $curl_post_data);
                curl_setopt($ch , CURLOPT_SSL_VERIFYPEER, false); //IMP if the url has https and you don't want to verify source certificate
                $result = curl_exec($ch);
                echo $result;
                print_r($result);
                curl_close ($ch)
                ?>

            <input type="submit" class="next action-button" value="Next" name="step1"/>
        </fieldset>
    </form>
</div>

编写此代码是为了检查是否已确认事件

 <div class="calendly-inline-widget" data-url="https://calendly.com/farbulu001" style="min-width:320px;height:400px;"></div>
                <script type="text/javascript" src="https://assets.calendly.com/assets/external/widget.js"></script>
                <!-- Calendly inline widget end -->
                <?php
                $ch = curl_init();
                curl_setopt($ch, CURLOPT_URL, "https://calendly.com/api/v1/echo");
                curl_setopt($ch, CURLOPT_HTTPHEADER, array(
                    "X-TOKEN: OBAMMHKFMHNN27F6ZUCS52RPDCS7GKWP",
                  ));
                curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
                curl_setopt($ch , CURLOPT_RETURNTRANSFER, true);
                curl_setopt($ch , CURLOPT_POST, true);
                curl_setopt($ch , CURLOPT_POSTFIELDS, $curl_post_data);
                curl_setopt($ch , CURLOPT_SSL_VERIFYPEER, false); //IMP if the url has https and you don't want to verify source certificate
                $result = curl_exec($ch);
                echo $result;
                print_r($result);
                curl_close ($ch)
                ?>

此外,我的客户希望只有在您在日历上点击“计划事件”后才会出现下一个按钮。

我尝试了上面的代码,但不适用于检查事件是否已确认。

4

0 回答 0