Кнопка динамического создания Bootstrap не запускает отправку формы - PullRequest
0 голосов
/ 30 мая 2020

Я создаю кнопку bootstrap динамически. Когда я выбираю его на iPad, цвет меняется, но не запускает отправку формы. Он работает на сенсорном экране Windows (Chrome, Explorer, Edge, Firefox).

Код:

CSS:

    .groupLeader {
        background-color:white;
        color:black;
        white-space: normal;
        height: 100%;
    }

js:

if (this.accountLevel === "Group-Leader"){
            $('#roleButtons').append($('<button id="' + this.agId + '" name="' + this.agId + '" type="submit" class="groupLeader btn btn-primary btn-lg col-lg-6 col-md-6 col-sm-12 col-xs-12">'
                    + this.accountLevel + " - "
                    + this.groupState + ", "
                    + this.groupRegion + ", "
                    + this.groupDistrict + ", "
                    + this.groupName
                    + '</button>'));
}

$("#rolesForm").validate({
    submitHandler: function(rolesForm) {
        //Ajax call - not triggered on iPad
    }
}

html:

        <form method="post" data-toggle="validator" role="form" id="rolesForm" name="rolesForm">

            <div class="form-group row">
                <div id="roleButtons" class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                    <!-- places for Role buttons -->
                </div>
            </div>



        </form>
...