0

Janko At Warpseds Form to Wizard プラグインをImagePicker プラグインと一緒に使用するフォームがあり、[次へ] をクリックする前にすべての画像が選択されていることを確認したいと考えています。

現在、Bassassistance 検証プラグインを使用しています。

これを実装する方法を知っている人はいますか?

現在動作中のコードとすべての JavaScript を表示する JSFiddle http://jsfiddle.net/4Hkxy/

    $(function () {
       jQuery(function($){
            var $signupForm = $( '#multipage' );
 $signupForm.formToWizard({
                submitButton: 'SaveAccount',
                showProgress: true, //default value for showProgress is also true
                nextBtnName: 'Forward >>',
                prevBtnName: '<< Previous',
                showStepNo: false,
                validateBeforeNext: function() {
                    var selectedCount = $('.thumbnails.image_picker_selector:visible .selected').length;
    var totalCount = $('.thumbnails.image_picker_selector:visible').length;

    if(selectedCount != totalCount) {
        alert('please select an image per selection');
    }
                }
            });
});

    $("select.image-picker").imagepicker({
        hide_select: true,
        show_label: true,
    });
    $("select.image-picker.show-labels").imagepicker({
        hide_select: true,
        show_label: true,
    });

    var container = $("select.image-picker.masonry").next("ul.thumbnails");
    container.imagesLoaded(function () {
        container.masonry({
            itemSelector: "li",
        });
    });

どんな助けでも大歓迎です。

4

1 に答える 1