Hi I would like to offer a toggle show/hide for some fields that are not mandatory. Is there is a modules for this or would it be a case of using a template and jquery.

  • jQuery will well for this: (function($) { $(document).ready(function() { $('#select1').change(function() { switch ($(this).val()) { case '1': $('#field2').hide(); break; default: $('#field2').show(); break; } }); }); }) (jQuery); You can also try Conditional Field module but it is in development. Sep 19, 2012 at 12:40
  • why you put shyghar answer as accepted answer? his answer have not any mention of jquery.
    – Yuseferi
    Sep 19, 2012 at 15:17
  • the person who added the jquery answer, did it whilst I was reading the other answers, and then deleted it after I marked the answer. Sep 20, 2012 at 20:08

2 Answers 2


You can put the not mandatory field in a group installing Field Group. The group have a 'collapsible' option.


You can Put your fields toghether with Field Group Module ,and after it you can show/hide it(field groups) by custom jquery code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.