Skip Navigation

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

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

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 hace 6 años, 3 meses. 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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

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)

Este tema contiene 2 respuestas, tiene 2 mensajes.

Última actualización por miguelG-5 hace 6 años, 3 meses.

Asistido por: Nigel.

Autor
Mensajes
#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']

enlace oculto

Champ : Secteur d'activité

Instead I get the checkboxes

What i'm I doing worng

Thanks for your help

#1087492

Nigel
Supporter

Idiomas: Inglés (English ) Español (Español )

Zona horaria: 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