The secret to wholesale...

In the article about buying Thai goods, I introduced wholesale markets and cheap...

Restaurant business and the...

Customers are a special figure in restaurants. This may seem obvious, but...

Guide the clues to...

Japanese goods Known for putting quality first. However, in the past, due...

Online cosmetics business and...

Starting a business, especially online cosmetics business is the silver trend and...
HomeLập trìnhPhpTrợ giúp CAPTCHA...

Trợ giúp CAPTCHA với PHP – JavaScript


Chúng tôi không phải là phần mở rộng của StackOverflow. Nếu bạn có câu hỏi, ít nhất xin vui lòng có phép lịch sự để dán câu hỏi của bạn vào diễn đàn này.

Tôi đang sử dụng https://www.jqueryscript.net/demo/image-puzzle-slider-captcha/ cho biểu mẫu, tôi cần đảm bảo các trường chính xác trước khi gửi. Ngay bây giờ nó chỉ bị kẹt (câu đố) nếu tôi nhấn nút gửi khi {các} trường chưa được điền.

Nếu tất cả các trường đều ổn, nó sẽ gửi tốt.

<h2>Contact Form</h2>
            <form id="contact-form" action="" method="post">
            <input autocomplete="off" type="text" id="website" name="website"/>

                <label class="name">
                    <input type="text" placeholder="Name:" data-constraints="@Required @JustLetters" />
                    <span class="empty-message">*This field is required.</span>
                    <span class="error-message">*This is not a valid name.</span>
                </label>
                <label class="email">
                    <input type="text" placeholder="E-mail:" data-constraints="@Required @Email" />
                    <span class="empty-message">*This field is required.</span>
                    <span class="error-message">*This is not a valid email.</span>
                </label>
                <label class="phone">
                    <input type="text" placeholder="Phone:" data-constraints="@Required @JustNumbers"/>
                    <span class="empty-message">*This field is required.</span>
                    <span class="error-message">*This is not a valid phone.</span>
                </label>
                <label class="message">
                    <textarea placeholder="Message:" data-constraints="@Required @Length(min=20,max=999999)"></textarea>
                    <span class="empty-message">*This field is required.</span>
                    <span class="error-message">*The message is too short.</span>
                </label>
                <br>


   <script>
    $('#captcha').sliderCaptcha({
        repeatIcon: 'fa fa-redo',
        onSuccess: function () {
            //if form fields are OK submit.
            document.getElementById('submit').click();

            //if not ok, reset the slider.
        }
    });
</script>

https://www.jqueryscript.net/demo/image-puzzle-slider-captcha/disk/longbow.slidercaptcha.js

Tệp này có tùy chọn đặt lại nhưng tôi không biết cách thực hiện và thực hiện điều đó trong tập lệnh ở trên.



Zik.vn – Biên dịch & Biên soạn Lại

Đọc thêm  Công việc học lập trình Php - Diễn đàn freeCodeCamp
spot_img

Create a website from scratch

Just drag and drop elements in a page to get started with Newspaper Theme.

Buy Now ⟶

Bài viết liên quang

DMCA.com Protection Status