Forums

ChronoForms V5 Accordion Doesn't Work

Tgoodrich 16 May, 2014
Hi,

I'm trying to build a chronoforms accordion. I followed the tutorial from this page http://www.chronoengine.com/faqs/2660-how-can-i-build-a-tabbed-form.html and did a quick mockup to test its functionality.

The accordion shows normally as it should but when clicking a new slider the accordion doesnt collapse the previously opened slider as in this demo http://greyhead.org/index.php?option=com_chronoforms&tmpl=component&chronoform=demo_form_sliders .

Am i missing something or is this a bug?

Heres what I'm seeing, http://184.154.228.17/~townofsa/index.php?option=com_chronoforms5&chronoform=test1-contact

The tutorial looks like its for v4 so maybe I need to do something different in v5 to make it work?

Thanks
Tgoodrich 18 May, 2014
Hi,

I've gone through the forums but can't seem to find any information on this. I also can't find where anyone else has had this problem either, so i am assuming the sliders are working as designed.

So my next question is, is it possible to make the slider accordion auto collapse?

By that I mean, I only want one slider open at a time. By default, when the form is loaded the first slider is open. When I clicked a new slider and it opens I want the previously open slider to automatically close.

Is there a javascript snippet or something i can use to make this work like i want?

Thanks
Max_admin 18 May, 2014
Answer
1 Likes
Hi Tgoodrich,

Please try the snippet below into a "load js" action:

jQuery(document).ready(function($){
	$('.panel-collapse').on('show.bs.collapse', function(){
		$.each($(this).closest('.panel-group').find('.in'), function(i, inp){
			$(inp).collapse('hide');
		});
	});
});


Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Tgoodrich 18 May, 2014
Hi Max,

That worked Perfectly.

Thank you!
This topic is locked and no more replies can be posted.