Skip Navigation

[Resolved] In cred : Show a checkbox field as a select list

This thread is resolved. Here is a description of the problem and solution.

Problem:
Client has a Types checkboxes field added to a Toolset Form that they want to display as a select dropdown.

Solution:
It is not possible, the type of input is determined by the Types field. It would be necessary to make the Types field a select field for it to display as a select field in a form.

Relevant Documentation:
https://toolset.com/documentation/customizing-sites-using-php/functions/

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

Our next available supporter will start replying to tickets in about 1.79 hours from now. Thank you for your understanding.

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+00:00)

This topic contains 2 replies, has 2 voices.

Last updated by miguelG-5 6 years, 3 months ago.

Assisted by: Nigel.

Author
Posts
#1087463

Hello

I am trying to: Show a checkbox field as a select list

Using this code <b>display='select' </b>

[cred_field field='secteur-m' display='select' value='' urlparam='' output='bootstrap']

hidden link

Champ : Secteur d'activité

Instead I get the checkboxes

What i'm I doing worng

Thanks for your help

#1087492

Nigel
Supporter

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

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

Hi Miguel,

you're not doing anything wrong.

If it is a taxonomy you can display it as checkboxes or select field, according to the display attribute of the cred_field shortcode.

See https://toolset.com/documentation/user-guides/cred-shortcodes/#cred_field

But that is only available for taxonomies.

If you have a Types field then it will be output according to how it was set up, i.e. if you made a Types checkboxes field then it will be output as checkboxes.

The format that Types checkboxes fields are saved in is very particular, and there isn't an alternative way of presenting the field.

If you need the field to appear as a select dropdown, you need to make the field a select field in the first place.

#1088277

Thank you Nigel

It is a custom fiel, not a taxonomy. At least I know it wont work

Miguel