Skip Navigation

[Resuelto] CRED conditional group vs Types conditions

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

Problem:

The issue here is that the customer wanted to know the difference between types conditional and CRED conditionals.

Solution:
The Post Fields conditional for types was meant for hiding fields on the backend and for this it works well but since the field information is called through the use of shortcodes with CRED then the field conditionals will be carried over as well.

This support ticket is created hace 7 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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Este tema contiene 2 respuestas, tiene 2 mensajes.

Última actualización por linaS hace 7 años, 3 meses.

Asistido por: Shane.

Autor
Mensajes
#561109

I'm building the complex form with CRED for some custom type with lots of fields.

First of all, I've added conditions to some fields at Post Field Group editor. It applied to this post type editor at admin.

Then I've created CRED form (auto-generated), and saw that the same conditions are working already on the form. But labels of the corresponding fields weren't hidden, only field controls. So it looks weird: there are labels without inputs, and if a condition is met, an input is sliding out.

So I searched and found there are conditional groups in CRED forms. I've added such groups (with the same conditions) to the form, and now fields are hiding with labels. But the catch is that clearly, both condition logics are working at once, so that when a field is being hidden, first I see input sliding out, then label. And when a field is being shown, first I see a label, then input jumps out.

Is there any way to fix this except simply getting rid of conditions at Porst Field Group?

[cred_show_group if="($(changed-last-name) eq  'yes' )"  mode='fade-slide']
	<div class="form-group">
		<label>Previous last name</label>
		[cred_field field='previous-last-name-en' post='application' value='' urlparam='' class='form-control' output='bootstrap']
	</div>
[/cred_show_group]
#561294

Shane
Supporter

Idiomas: Inglés (English )

Zona horaria: America/Jamaica (GMT-05:00)

Hi Lina,

Thank you for contacting our support forum.

The Post Fields conditional for types was meant for hiding fields on the backend and for this it works well but since the field information is called through the use of shortcodes with CRED then the field conditionals will be carried over as well.

What you can do is to just wrap the CRED conditional around the Label as a workaround for this.

Thanks,
Shane

#561352

ok, I see