Skip Navigation

[Résolu] Crear una condicional en un formulario

This support ticket is created Il y a 2 années et 3 mois. 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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Karachi (GMT+05:00)

Marqué : 

This topic contains 1 réponse, has 2 voix.

Last updated by Waqar Il y a 2 années et 3 mois.

Assisted by: Waqar.

Auteur
Publications
#2253381

Hola Nigel, necesito crer una condicional para que antes de un registro de formulario de usuario, el usuario tengan de poner un codigo y si el codigo es el correcto que muetre el formulario y si el codigo no es el correcto muetre un mensaje "lo sentimos no es correcto".
En la primera condición funciona, cuando se pone el numero "1234" aparece el formulario pero en el caso que se ponga un código incorrecto no me aparece el mensaje "lo sentimos..."
No se muy bien que es lo que estoy haciendo mal, ¿deberia poner un "And"?

[cred_show_group if="( $(codigo-activacion) eq '1234' )" mode="fade-slide"] 
Formulario registro
[/cred_show_group]

  [cred_show_group if="( $(codigo-activacion) ne '1234' )" mode="fade-slide"]
  Lo sentimos no es correcto ...
  [/cred_show_group]

Un saludo.
Rafa Corts

#2254003

Waqar
Supporter

Languages: Anglais (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting us and I'd be happy to assist.

Nigel is on vacation until next week, so I hope you wouldn't mind if I reply in English.

I've tested the conditional group statements that you've shared on my test website and they seem to work, as expected.

If your goal is to only show the incorrect code message, once the user has added some text in the relevant field, you can include an additional check for the empty value like this:


[cred_show_group if="( $(codigo-activacion) eq '1234' )" mode="fade-slide"] 
Formulario registro
[/cred_show_group]
 
[cred_show_group if="( $(codigo-activacion) ne '1234' ) AND ( $(post_title) ne '' )" mode="fade-slide"]
Lo sentimos no es correcto ...
[/cred_show_group]

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

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