Forms for jQuery and jQuery Mobile

light
dark

Change the theme setting here

Forms - Validation

Change demo
Validation

Mobiscroll does not have built in validation mechanism, but provides error state styling. Use the mbsc-err css class on the form element's container and the mbsc-err-msg css class on the error message.

mobiscroll.settings = {
    lang: '',
    theme: ''
};

$(function () {
    var now = new Date();
    $('#md-birthday').mobiscroll().date({
        defaultValue: new Date(now.getFullYear() - 18, 0, 1),
        min: new Date(now.getFullYear() - 100, now.getMonth(), now.getDate()),
        max: new Date(now.getFullYear() - 13, now.getMonth(), now.getDate())
    });

    $('#md-country').mobiscroll().select({
        display: 'bottom',
        placeholder: 'Country',
        group: true,
        maxWidth: [40, 260],
        width: [40, 235]
    });

    $('#md-phone').mobiscroll().numpad({
        display: 'bottom',
        cssClass: 'md-phone-num',
        template: '{plus}ddddddddddd',
        maxLength: 14,
        allowLeadingZero: true,
        leftKey: {
            text: '+',
            value: '',
            variable: 'plus:+'
        },
        formatValue: function (numbers, vars, inst) {
            var newVal = '';

            if (vars.plus) {
                newVal += vars.plus;
            }

            newVal += numbers.join().replace(/,/g, '');

            return newVal;
        },
        parseValue: function (value) {
            if (value) {
                return value.toString().split('');
            }
            return [];
        },
        validate: function (event, inst) {
            var disabled = [],
                invalid = false;

            if (inst.isVisible()) {
                inst._markup[0].querySelector('.mbsc-np-dsp').innerHTML = inst.settings.formatValue(event.values, event.variables, inst) || ' '
            }

            return {
                invalid: invalid,
                disabled: disabled
            };
        }
    });

    $('#md-success').mobiscroll().widget({
        display: 'modal',
        focusOnClose: false,
        buttons: [{
            text: 'Log in',
            handler: 'set'
        }],
    });

    $('#demo').on('submit', function (ev) {
        if ($(this).valid()) {
            ev.preventDefault();
            $('#md-success').mobiscroll('show');
        }
    }).validate({
        errorClass: 'mbsc-err-msg',
        errorPlacement: function (error, element) {
            element.parent().append(error);
        },
        highlight: function (element) {
            $(element).closest('.mbsc-input').addClass("mbsc-err");
        },
        unhighlight: function (element) {
            $(element).closest('.mbsc-input').removeClass("mbsc-err");
        }
    });

});
<form id="demo" style="display:none" mbsc-form>
    <div class="mbsc-form-group">
        <div class="mbsc-form-group-title">Sign Up</div>

        <label>
            <input name="username" type="text" placeholder="Username" minlength="2" required data-icon="user4">
        </label>

        <label>
            <input name="email" type="email" placeholder="Email" required data-icon="ion-ios7-email">
        </label>

        <label>
            <input name="password" type="password" placeholder="Password" minlength="6" required data-icon="lock2" data-password-toggle="true">
        </label>
    </div>
    <div class="mbsc-form-group">
        <div class="mbsc-form-group-title">Personal data</div>

        <label>
            <input name="firstname" type="text" placeholder="First name" required data-icon="user4">
        </label>

        <label>
            <input name="lastname" type="text" placeholder="Last name" required data-icon="empty">
        </label>

        <label>
            <input name="birthday" id="md-birthday" type="text" placeholder="Birthday" required data-icon="calendar">
        </label>

        <label>
            <input name="phone" id="md-phone" type="tel" placeholder="Phone" required data-icon="phone">
        </label>

        <label>
            <select name="country" id="md-country" required data-icon="location">
                <optgroup label="A">
                    <option selected disabled></option>
                    <option value="1">Afganistan</option>
                    <option value="2">Albania</option>
                    <option value="3">Algeria</option>
                    <option value="4">Argentina</option>
                    <option value="5">Australia</option>
                    <option value="6">Austria</option>
                    <option value="7">Azerbaijan</option>
                </optgroup>
                <optgroup label="B">
                    <option value="8">Bahamas</option>
                    <option value="9">Bahrain</option>
                    <option value="10">Bolivia</option>
                    <option value="11">Brazil</option>
                    <option value="12">Bulgaria</option>
                </optgroup>
                <!-- Showing partial data. Download full source. -->
            </select>
        </label>

        <label>
            <input name="address" type="text" placeholder="Address" data-icon="empty">
        </label>

        <label>
            <input name="company" type="text" placeholder="Company" data-icon="office">
        </label>

        <label>
            <input name="title" type="text" placeholder="Title" data-icon="empty">
        </label>

        <label>
            <textarea name="about" placeholder="About me" data-icon="line-note"></textarea>
        </label>

        <label>
            <input type="text" placeholder="Website" data-icon="globe">
        </label>
    </div>
    <div class="mbsc-form-group">
        <div class="mbsc-form-group-title">Gender</div>

        <label>
            Male
            <input type="radio" name="gender" checked>
        </label>

        <label>
            Female
            <input type="radio" name="gender">
        </label>
    </div>
    <div class="mbsc-form-group">
        <div class="mbsc-form-group-title">Settings</div>

        <label>
            Send me marketing e-mail
            <input data-role="switch" name="news" value="0" type="checkbox">
        </label>
    </div>
    <div class="mbsc-form-group">
        <div class="mbsc-form-group-title">E-mail Categories</div>

        <label>
            Baby
            <input name="cat1" type="checkbox">
        </label>
        <label>
            Beauty
            <input name="cat2" type="checkbox">
        </label>
        <label>
            Books
            <input name="cat3" type="checkbox">
        </label>
        <label>
            Clothing & Accessories
            <input name="cat4" type="checkbox">
        </label>
        <label>
            Computer & Accessories
            <input name="cat5" type="checkbox">
        </label>
        <label>
            Electronics
            <input name="cat6" type="checkbox">
        </label>
    </div>
    <div class="mbsc-form-group mbsc-btn-group-block">
        <button data-icon="checkmark" type="submit">Sign Up</button>
    </div>
</form>

<div id="md-success" style="display:none;">
    <h3>Thank you for registering</h3>
    <p>You have successfully signed up as a user!</p>
</div>

Forms - Create account

Change demo
Create account
Signup screen with name, email and password and phone number fields.
// Use the settings object to change the theme
mobiscroll.settings = {
    lang: '',
    theme: ''
};


$(function () {
    $('.md-phone').mobiscroll().numpad({
        display: 'bottom',
        cssClass: 'md-phone-num',
        template: '{plus}dddddddddddddd',
        maxLength: 14,
        allowLeadingZero: true,
        leftKey: {
            text: '+',
            value: '',
            variable: 'plus:+'
        },
        formatValue: function (numbers, vars, inst) {
            var newVal = ' ';

            if (vars.plus) {
                newVal += vars.plus;
            }

            newVal += numbers.join().replace(/,/g, '');

            return newVal;
        },
        parseValue: function (value) {
            if (value) {
                return value.toString().split('');
            }
            return [];
        },
        validate: function (event, inst) {
            var disabled = [],
                invalid = false;

            if (inst.isVisible()) {
                inst._markup[0].querySelector('.mbsc-np-dsp').innerHTML = inst.settings.formatValue(event.values, event.variables, inst) || '&nbsp;'
            }

            return {
                invalid: invalid,
                disabled: disabled
            };
        }
    });
})
<div id="demo" class="md-create-account" style="display:none" mbsc-form>

    <div class="md-chart-pic"></div>

    <div class="md-cac-title mbsc-padding">
        <h4>Great news, your traffic <br> is already being tracked</h4>
        <h4>Continue by creating a new account</h4>
    </div>
    <div class="md-cac-cont">
        <div class="mbsc-form-group-inset">
            <label>
                    <input name="username" type="text" placeholder="Name">
                </label>

            <label>
                    <input name="email" type="email" placeholder="Email address">
                </label>

            <label>
                    <input name="password" type="text" placeholder="Password"  data-password-toggle="true">
                </label>

            <label>
                    <input name="phone" type="tel" placeholder="Phone" class="md-phone">
                </label>
        </div>
        <div class="md-cac-btn mbsc-form-group-inset">
            <button class="mbsc-btn-block" type="submit">Create account</button>
            <button class="mbsc-btn-flat mbsc-btn-block"> I'll do it later</button>
        </div>
    </div>
</div>
.md-create-account {
    padding: 0!important;
}

.md-create-account .md-cac-title {
    text-align: center;
    padding-bottom: 3em;
}

.md-create-account .md-cac-title,
.md-create-account .md-cac-cont {
    padding-top: 0;
}

.md-create-account .md-cac-cont {
    padding-bottom: 0;
}

.md-create-account .md-chart-pic {
    background-image: url("/content/img/demos/chart@1x.png");
    height: 150px;
    background-repeat: no-repeat;
    background-position: center;
}

@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 144dpi) {
    .md-create-account .md-chart-pic {
        background: url("/Content/img/demos/chart@2x.png") no-repeat center 12px;
        background-size: 109px 81px;
        background-position: center;
    }
}

.md-phone-num .mbsc-np-dsp {
    min-height: 25px;
    -webkit-box-sizing: content-box;
    -moz-box-sizing: content-box;
    box-sizing: content-box;
}

Forms - Sign up

Change demo
Sign up
Signup and register form with name, email and password fields, featuring framework specific validation.
// Use the settings object to change the theme
mobiscroll.settings = {
    lang: '',
    theme: ''
};


$(function () {
    $('#demo').on('submit', function (ev) {
        if ($(this).valid()) {
            ev.preventDefault();
            $('#demo-success').mobiscroll('show');
        }
    }).validate({
        errorClass: 'mbsc-err-msg',
        errorPlacement: function (error, element) {
            element.parent().append(error);
        },
        highlight: function (element) {
            $(element).closest('.mbsc-input').addClass("mbsc-err");
        },
        unhighlight: function (element) {
            $(element).closest('.mbsc-input').removeClass("mbsc-err");
        },
        rules: {
            "password": {
                required: true,
                regex: '^(?=.*[a-z])(?=.*[A-Z])[0-9a-zA-Z]{6,}$'
            }
        },
        messages: {
            "password": {
                regex: "Invalid, please see rules"
            }
        }
    });

});
<form id="demo" class="md-signup-rules" style="display:none" ng-non-bindable mbsc-form>

    <div class="mbsc-form-group-inset">
        <div class="mbsc-form-group-title md-signup-title">Sign Up</div>

        <label>
            <input name="username" type="text" placeholder="Name" minlength="4" required>
        </label>

        <label>
            <input name="email" type="email" placeholder="Email" required>
        </label>

        <label>
            <input id="password" name="password" type="text" placeholder="Password"  required data-password-toggle="true">
        </label>
    </div>

    <div class="mbsc-form-group-inset">
        <div class="mbsc-padding">
            <h6 class="mbsc-desc">Use lowercase and uppercase characters </h6>
            <h6 class="mbsc-desc">Length of password should be at least 6 characters</h6>
        </div>
        <div class="mbsc-padding">
            <button class="mbsc-btn-block" type="submit">Sign Up</button>
        </div>
    </div>

</form>

Forms - Log in

Change demo
Log in
Login form with email and password fields, forgot password link and framework specific validation.
// Use the settings object to change the theme
mobiscroll.settings = {
    lang: '',
    theme: ''
};

$(function () {
    var isLogin = false;

    $('.md-signup').on('click', function (ev) {
        ev.preventDefault();
        $('.md-signup-btn').text(isLogin ? 'Sign in' : 'Sign up');
        $(this).text(isLogin ? "Don't have an account yet? Sign up." : "Already have an account?");
        isLogin = !isLogin;
    });

    $('.md-login').on('click', function (ev) {
        ev.preventDefault();
    });

});
<div id="demo" class="md-login-form" style="display:none" mbsc-form>
    <div class="md-logo micons icon-mbsc-logo"></div>
    <div class="mbsc-form-group-inset">
        <label>
            <input id="email" type="email" name="Email" placeholder="Email" />
        </label>
        <label>
            <input name="password" type="text" placeholder="Password" data-password-toggle="true" data-icon="none" data-icon-align="right" />
        </label>
    </div>
    <div class="mbsc-form-group-inset mbsc-padding mbsc-align-center">
        <a href="#" class="md-signup">Don't have an account yet? Sign up.</a>
        <br><br>
        <a href="#" class="md-login">Forgot password?</a>
    </div>
    <div class="mbsc-form-group-inset mbsc-padding">
        <button class="mbsc-btn-block md-signup-btn">Sign in</button>
    </div>
</div>
.md-login-form .md-logo {
    display: inline-block;
    width: 100%;
    font-size: 80px;
    text-align: center;
    height: 46px;
    margin: 130px 0 30px 0;
    color: #1c75bc;
}

Looking for something you didn't see or have a sales question?
Ask us about it, we're here to help.

Component license


Purchase component licenses if you are looking for specific funcionality.

Total


All features will be included with the license.

Buy component license

Framework license


Get all 36 components, including with the Framework license.



Mobiscroll for JQuery $595


Use Javascript when building with plain and simple JS. Use jQuery when you have jQuery already included or if you are building with jQuery Mobile. Use AngularJS when building with Angular 1.x or Ionic 1. Use Angular when building with Angular 2/4/5/6/7/8 or Ionic 2/3/4. Use it when you are building your app or website with React.


Buy framework license
See other licensing options

Framework license


Get all 36 components, including with the Framework license.



Mobiscroll for JQuery $595


  • Use it when building with plain and simple JS
  • Compatible with vanilla JS app or frameworks like Vue
  • Royalty-free commercial usage
  • Technical support is included with the license
  • Use it with jQuery and jQuery Mobile
  • Enjoy the familiar API if you already use jQuery
  • Royalty-free commercial usage
  • Technical support is included with the license
  • Use it with Angular JS and Ionic 1
  • For web and mobile apps based on Angular 1.x
  • Royalty-free commercial usage
  • Technical support is included with the license
  • Use it with Angular and Ionic 2/3/4
  • Visual Studio and VS Code integration
  • Royalty-free commercial usage
  • Technical support is included with the license
  • Use it when building with React JS
  • Collection of UI components for web and mobile
  • Royalty-free commercial usage
  • Technical support is included with the license
Buy framework license
See other licensing options

Framework license


Select the development framework you are using. Get all 36 components with the license.

Mobiscroll for Javascript
Mobiscroll for jQuery
Mobiscroll for React
Mobiscroll for Angular
Mobiscroll for Angular JS
  • Use it when building with plain and simple JS
  • Compatible with vanilla JS app or frameworks like Vue
  • Royalty-free commercial usage
  • Technical support is included with the license
  • Use it with jQuery and jQuery Mobile
  • Enjoy the familiar API if you already use jQuery
  • Royalty-free commercial usage
  • Technical support is included with the license
  • Use it with Angular JS and Ionic 1
  • For web and mobile apps based on Angular 1.x
  • Royalty-free commercial usage
  • Technical support is included with the license
  • Use it with Angular and Ionic 2/3/4
  • Visual Studio and VS Code integration
  • Royalty-free commercial usage
  • Technical support is included with the license
  • Use it when building with React JS
  • Collection of UI components for web and mobile
  • Royalty-free commercial usage
  • Technical support is included with the license
Buy framework license
See other licensing options

Select the framework you are interested in

Javascript
jQuery
Angular
Angular JS
React

Use Javascript when building with plain and simple JS.

Use jQuery when you have jQuery already included or if you are building with jQuery Mobile.

Use AngularJS when building with Angular 1.x or Ionic 1.

Use Angular when building with Angular 2/4/5/6/7/8 or Ionic 2/3/4.

Use it when you are building your app or website with React.

Do you need additional support seats?

The license comes with one support seat. ( +$100/seat )

Add the source code?

Price
Buy now
Customize & try demos locally
Sign in or start your free trial

What framework are you using?

Javascript
jQuery
AngularJS
Angular
Ionic
React
Other
Select a framework
Email address

Customize & try this demo locally
Sign in or start your free trial

We have to set you up with a trial for this to run 👍

Email address

Install demo in your app
Follow this quick, two minute install guide
Close window

Step 1.Install the Mobiscroll CLI from npm

Copy command
$ npm install -g @mobiscroll/cli

The CLI makes configuring your apps super simple 👍

Step 2.Run the following command in the root folder of your Ionic project

Copy command
$ mobiscroll config ionic
$ mobiscroll config ionic --lite

You will be prompted to log in with your mobiscroll account. Set your password here

Create an Ionic 3 & Mobiscroll starter with the CLI:

$ mobiscroll start ionic myStarter

Run this command for Ionic 4 & Mobiscroll starter:

$ mobiscroll start ionic-angular myStarter

Step 3.Copy the code into your app.

Copy TS
Copy HTML
Copy CSS
Copy Module

Step 4.Run ionic serve in the root folder of your app 🎉

Copy command
$ ionic serve

And voilà, everything should be running smoothly.

Customize & try demos locally
How would you like to do it?
Install demo in your app
Follow this quick, two minute install guide
Close window

Step 1.Install the Mobiscroll CLI from npm

Copy command
$ npm install -g @mobiscroll/cli

The CLI makes configuring your apps super simple 👍

Step 2.Run the following command in the root folder of your Angular project

Copy command
$ mobiscroll config angular
$ mobiscroll config angular --lite

You will be prompted to log in with your mobiscroll account. Set your password here

Step 3.Copy the code into your app. HTML goes into the markup, TS into Typescript.

Copy TS
Copy HTML
Copy CSS
Copy Module

Step 4.Run ng serve in the root folder of your app 🎉

Copy command
$ ng serve

And voilà, everything should be running smoothly.

Thanks for downloading
Try and customize the app locally

Extract the zip file and run the project like any Ionic app. Make sure to have Ionic CLI installed and open the terminal in the app root folder.

Step 1. Run in root folder
$ npm install
Step 2. Start the app
$ ionic serve

Let us know if we can help and enjoy!

Change your password
Need to update your password? Enter and hit the button below

You are setting a password for the account

New Password Required Enter at least 6 characters
Change your password
Need to update your password? Enter and hit the button below

Your password has been changed!

Thanks for downloading
Customize demos locally

Everything is set up so that you can dig in right away and start exploring.

Please extract the zip file and simply open the demos in your favorite browser. For instructions on how to install Mobiscroll in your project follow this guide.


Let us know if we can help and enjoy!

Thanks for downloading
Customize demos locally

Please extract the zip file and run the project like any Angular CLI app. Make sure to have the Angular CLI installed.

For installation and usage, extract the zip file and open a terminal window and follow these steps.

Step 1. Run in root folder
$ npm install
Step 2. Start the app
$ ng serve --open

Let us know if we can help and enjoy! 👍

Thanks for downloading
Customize demos locally

Everything is set up so that you can dig in right away and start exploring.

We have set up a trial so that you can try the demos locally.

The easiest way to get started is to follow the installation steps and by grabbing the code directly from the demo page. Let us know if we can help and enjoy!

You'll find a fully functional Kitchen-sink Ionic app in the zip file.

Thanks for downloading
Customize demos locally

The demos are using Babel's in-browser ES6 and JSX transformer.

Please extract the zip file and open the demos in your browser. For instructions on how to install Mobiscroll in your project follow this guide.


Let us know if we can help and enjoy!

Demos
Alerts & notifications
Alert Notifications
Inputs & fields
Text Fields Select
Components
Alerts & notifications 2
Buttons 3
Calendar 13
Color 8
Date & Time 9
Event Calendar 2
Forms 4
Image 5
Inputs & fields 2
Listview 8
Measurement 9
Menustrip 10
Number 6
Numpad 12
Popup 2
Range 10
Rating 11
Scroller 5
Select 8
Slider & progress 3
Styling 3
Timer 4
Timespan 5
Toggle & Radio 4
Treelist 5
Theme Select
Mobiscroll
Mobiscroll Dark
Material
Material Dark
iOS
iOS Dark
Android Holo
Android Holo Light
Windows Phone
Windows Phone Light
Display Mode
Language Locale
See other demos and change options
Theme
Display
Locale
See other demos