var CustomForm = function () {


    return {
        //main function to initiate the module
        init: function () {

            // use select2 dropdown instead of chosen as select2 works fine with bootstrap on responsive layouts.

            
            $('.select2').select2({
                allowClear: false
            })
            

            $('.select2').each(function (i, obj) {

                if ($(obj).data("select2") === 'undefined')
                {
                    $(obj).select2({
                        allowClear: $(obj).attr('data-allow-clear') ? $(obj).data('allow-clear') : false
                    });
                }
            });

            $('.date-picker').datepicker()


        }

    };

}();