Skip Navigation

[Resolved] cred_field dropdown not rendering properly.

This support ticket is created 7 years, 11 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.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+01:00)

This topic contains 3 replies, has 2 voices.

Last updated by Nigel 7 years, 11 months ago.

Assisted by: Nigel.

Author
Posts
#396174
Screen Shot 2016-05-09 at 9.45.38 AM.png
Screen Shot 2016-05-09 at 9.44.56 AM.png

I am trying to: use cred field to create a dropdown

I visited this URL: Will provide by private message if needed

I expected to see: a drop down menu

Instead, I got: See screenshots first one is element not active and the next one is active element.

#396380

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

James

This looks like a CSS styling issue for the background colour of your first screenshot, but could you clarify how and where you are creating the dropdown?

Are you creating a CRED form and adding custom fields which you have previously created with Types? Or something else?

Let me know and I should be able to help you with a solution.

#396389

Hi Nigel,

Thanks for your help.

I am creating a CRED form and inside there I want to be able to have users multi-select from the taxonomy I have attached to custom post type.

I haven't installed a theme yet so this is just in twentysixteen.

Cheers,
James

#396430

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Hi James

Your screenshots had me puzzling over what precisely the problem was for a while.

What you are seeing is the default styling for a multiline select box. It looks pretty much the same if you look at it in different browsers, and in different themes unless the theme specifically includes some alternative styling for the select box.

If you look in the markup you will see that the `<select>` statement specifies `multiple="multiple"`. That is because in WordPress users are able to select multiple taxonomy terms, and there is no way in-built way to restrict the user to selecting a single term.

If that is your intention, you have two main options.

One is to not use a taxonomy, but to add a custom field instead that uses a single select box. To return a list of matching posts you will no longer be able to use a taxonomy view but will need to create a view that filters your posts based on your custom field.

An alternative is to hack your form display by adding a JavaScript snippet to the form which removes the multiple parameter from your select tag which will cause it to render as a dropdown select.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.