Page 1 of 2

Accordion Expand

Posted: 18 Nov 2015
by ksertkaya
Hello,

I have an accordion in form. When I open this form, all tabs expand except first tab. How do I expand first tab when I open this form?
http://prntscr.com/941zcf

Here's my current code:

$('#fd_accordion-0 > h3:eq(0)').click()
$('#fd_accordion-0 > h3:eq(1)').click()
$('#fd_accordion-0 > h3:eq(2)').click()
$('#fd_accordion-0 > h3:eq(3)').click()
$('#fd_accordion-0 > h3:eq(4)').click()

Re: Accordion Expand

Posted: 18 Nov 2015
by rostislav
Hi!

You have 4 tabs in the accordion, but are trying to expand 5. The last line in fact initiates a click on the first tab. Remove the last line and you'll be fine.

Re: Accordion Expand

Posted: 18 Nov 2015
by ksertkaya
Hi,

Fifth tab doesn't seem in that picture
http://prntscr.com/944add

Re: Accordion Expand

Posted: 18 Nov 2015
by rostislav
Show the code that you're using with that accordion.

Re: Accordion Expand

Posted: 18 Nov 2015
by ksertkaya
I use just that code for accordion. Do I have to use another code for accordion?

Re: Accordion Expand

Posted: 18 Nov 2015
by rostislav
OK, this is happening because one of the tabs (in this case - the first one) is opened by default, so what you're doing is closing it. Probably best you just set which tabs are opened by default in Forms Designer. Go to Forms Designer, select the accordion, look to the right, you'll see the "Expanded" field. Enumerate here all your tabs, starting from 0, like this:

0,1,2,3,4

Re: Accordion Expand

Posted: 18 Nov 2015
by ksertkaya
Thank you very much rostislav !

Re: Accordion Expand

Posted: 19 Apr 2016
by lijupnandanan
Hi,
By default when I cleck new form , The first accordion tab will be expanded. i need to collapse every tab on New form and need to expand only when I clicked the tab. how can I resolve this?
I added this on Page load
$('#fd_accordion-0 > h3:eq(0)').click()

But its not working

Re: Accordion Expand

Posted: 19 Apr 2016
by Dmitry Kozlov
Open the designer, select the Accordion, and clear the Expanded property. Then clear cookies.

Re: Accordion Expand

Posted: 19 Apr 2016
by lijupnandanan
Still Not working. I didnt enter any tab index on Expanded property an I cleared the cookies.
Issues on
1. Click New form expand first tab and then click cancel button.
2. Again click New form , Now the first tab is expanded without clicking on it.
But when we collapsed all tab and click cance button and again click new form all tabs are in collapsable. Thats the issue