How to implement dependent dropdowns in Rails 4 with an unobtrusive jQuery script

Logo devnterface d88f51727b3053dd3115e1ef9c566ad79b4c2edb3cd208c06345fc37058bebd9

I recently had to implement a view with the classic search form with two select dependent on each other. My aim was to leave the page as clean as possible and make the code that loads the options for the daughter dropdown reusable.Suppose, therefore, to have two models, SpecializationType and Specialization, defined as follows:12345678910111213141516171819202122232425262728293...

Read more

How to insert more Disqus comments box in a single page

Logo devnterface d88f51727b3053dd3115e1ef9c566ad79b4c2edb3cd208c06345fc37058bebd9

Hello everyone! For those not familiar Disqus is a platform that allows you to easily insert a box for comments on any website and allows users to use the their Facebook or Twitter account (but not only) to authenticate. The limit of Disqus is that it associates any thread of comments to a unique url. Consequently, it will expect that in every page there is only a comment box. In most cases this limit is accep...

Read more

A new layout easier and more spacious

Logo devnterface d88f51727b3053dd3115e1ef9c566ad79b4c2edb3cd208c06345fc37058bebd9

In the last days we have spent a bit of our time to do a full redesign of our website and our blog. The result is what you are looking while reading this article. Specifically, the innovations we introduced in both the theme of the blog and the web site are: Wider layout splitted into two columns also for the website Blog contents with more space, which is v...

Read more

How to implement two dropdowns dependent on each other using Django and jQuery

Logo devnterface d88f51727b3053dd3115e1ef9c566ad79b4c2edb3cd208c06345fc37058bebd9

Hello everyone.With today’s article I want to show how to implement two dropdowns dependent on each other using Django and jQuery.Suppose we have a 1-N relationship between car brands and car models: we want to show the list of brands in the first dropdown; then once you have selected a brand, the second dropdown will show a list of filtered mode...

Read more
Ruby on Rails and jQuery: multiselect with checkbox

Ruby on Rails and jQuery: multiselect with checkbox

Logo devnterface d88f51727b3053dd3115e1ef9c566ad79b4c2edb3cd208c06345fc37058bebd9

Today I want to present a very convenient jQuery plugin I’ve used to create a combo box with checkboxes for a multi-selection field.Suppose we have a form of insertion / modification of user data, and that the user can have multiple functions. We start with rendering the form with a multi-selection field, where you can select more functions with the combination “<ctrl> + click “.1...

Read more