Skip Navigation

[Resolved] Accordion feature in CRED form

This support ticket is created 6 years, 12 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

Tagged: 

This topic contains 5 replies, has 2 voices.

Last updated by Minesh 6 years, 12 months ago.

Assisted by: Minesh.

Author
Posts
#593059

Hi,

I'm trying to add an accordion feature to a CRED form in order to organize all the input fields. I'm following the code provided in the link below for the function:

hidden link

I have the accordion working properly, but every time I click the accordion to expand I get a CRED warning about required empty fields. It almost like its trying to submit every time I click the accordion. Is there any way to stop this from happening?

Thanks,
Tom

#593262

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - the accordion example you shared is using button and that might be the cause that its displaying the errors you mentioned.

I would like to know - are you using bootstrap?

#593503

No, I'm not using bootstrap.

Is there a way I can add some form of ID to the accordion button code so that when the accordion is clicked it only tuns the accordion code instead of the CRED submit button code?

Thanks

EDIT: what about calling the function:

.preventDefault()

in the js code for the accordion buttons? Seems like it might prevent the buttons from submitting.

#593516

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

So - you should activate the bootstrap from:
=> Toolset => Settings => General tag => Bootstrap loading section => Select "Toolset should load Bootstrap 3.0".

Then you should try following code - it should work.
hidden link

#593568

Ok thanks I'll give that a try. Will I need to add all the source info at the beginning or is that included when bootstrap is loaded?

#593761

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - you need to add required HTML to build your accordion as per your need and at place where you required within your CRED form.