Implement BotDetect With Angular js

Viewed 1237

We have license of BotDetect. and I would like to implement this BotDetect with Angular js. I Search in google And I found nothing proper helpful, however, I got angularjs-captcha which looks promising but didn't help me.

Here is what I need exactly.

  1. page load with Captcha Image
  2. User Fill the form
  3. User Hit on Submit
  4. Using $http request page submit
  5. If the response comes success or failure Captcha should be reloaded as per it's working engine.

Here is My Form

<form ng-submit="Submit($event)">
    <table width="100%" cellpadding="0" cellspacing="1" align="center">
        <tr>
            <td class="datafield">
                <label>Name:</label>
                <span class="red">*</span>
            </td>
            <td class="datafield">
                <input type="text" maxlength="50" class="searchboxmain" placeholder="enter name..."
                    ng-model="Form.Name" />
            </td>
        </tr>
        <tr>
            <td class="datafield">
                <label>Email:</label>
                <span class="red">*</span>
            </td>
            <td class="datafield">
                <input type="email" maxlength="240" class="searchboxmain" placeholder="enter email..."
                    ng-model="Form.Email" />
            </td>
        </tr>
        <tr>
            <td class="datafield">Enter Captcha
            </td>
            <td class="datafield">
                <botdetect-captcha>
            <br />
                <input type="text" id="CaptchaCodeTextBox" ng-model="Form.Captcha"/>
            </td>
        </tr>
        <tr>
            <td class="datafield"></td>
            <td class="datafield">
                <button class="submitbutton" ng-click="Submit($event)">Submit enquiry</button>
            </td>
        </tr>
    </table>
</form>

Controller

app.controller('ContactCtrl', function($scope, $http) {
    $scope.Form = {
        Name: '',
        Email: '',
        Captcha: ''
    };
    $scope.Submit = function(event) {
        // Here all code
        event.preventDefault();
    };
});

I am quite sure there could be other solution instead of using this Angular Captcha but I don't know anyone so, an alternative solution can be accepted.

1 Answers
Related