How to add icons in html select options ??

In one of our recent project, we need to add icons such as fontawesome, glyphicons etc to the options text in HTML select element. But the problem was HTML strips any tags inside option tag of the select field.

To add icons in select option text we have to use the bootstrap-select plugin, which is a great plugin for customizing plain HTML select with some great customization options using bootstrap style.With this plugin, we can style the select element with only simple data attributes or initialize with Javascript.
With this plugin, there are two methods available to add icons to select options

Read more…

How to validate dynamically generated input fields with jQuery Validation plugin ??

As we know jQuery validation plugin is the most commonly used client side form validation library which provides plenty of customization with an ease to save time for manually validating each HTML form elements from scratch.

Though this plugin provides lots of inbuilt function to customize validation, sometimes it becomes tricky to properly use this plugin as per our requirements.
For example in one of my recent project I was in a need to validate dynamically generated fields.
With some research, I came up with a solution which I’m describing below with an example.

Read more…