Add input fields to form dynamically using jQuery

Introduction This tutorial shows an example how to add input fields to form dynamically using jQuery. Input field types may be text, textarea or file to the form. We also have added remove button next to the added input field to remove the field if you do not need it. For this example, I have used here jQuery for dynamically adding inputs, CSS for some basic style and HTML code. How does it work? We have select/option for what type of input to be added to the form. We have…

Continue

Limit number of checkbox selections using javascript

Introduction This tutorial shows how to limit number of checkbox selections using JavaScript in a group of checkboxes. Suppose you have a group of checkboxes in a form or in a div or a table cell or wherever else and you have a requirement that a user can select maximum of two or three or n number of checkboxes then you need to restrict it using javascript or jquery. The below example shows how to achieve it using JavaScript.

Continue