Sauter la navigation

[Résolu] Required fields dont work

This support ticket is created Il y a 5 années et 1 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.

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)

Ce sujet contient 2 réponses, a 2 voix.

Dernière mise à jour par Waqar Il y a 5 années et 1 mois.

Assisté par: Waqar.

Auteur
Publications
#1380991
2019-11-12 15_04_43-Window.png
2019-11-12 15_02_21-Window.png
2019-11-12 14_59_03-999990004 – PLATAFO-LMA.png

I am trying to:
I added that one of fields are required, but not are working, on form are 3 required fields,
a date, radiobutton and single line
the date and radiobutton works, but slingle line dont do it.
I think that are a trouble because the single line field show when a radiobutton opcion are selected and show the creed fields,
The square red its a required field

#1381629

Hi Rafael,

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

To troubleshoot this, I'll need to see how these fields are set up in the custom field group and the form.

Can you please share temporary admin login details, in reply to this message?

Note: Your next reply will be private and though no changes will be made on your website, please make a complete backup copy, before sharing the access details.

regards,
Waqar

#1382771

Hi Rafael,

Thank you for sharing the admin access.

During troubleshooting, I noticed that your form includes the required "muestraredcapcode" field twice, nested in two separate conditions.

One condition shows it when the value of field "momentoestudioextraccmuestraensayo" is 7 and another condition shows it when this value is 8.

As this is a radio type field, it can only have one value at a time and as a result, whenever one of these conditions will be true, the other one will be false. This is why the form is submitted even when "muestraredcapcode", the required field is empty.

To overcome this, you can include this field only once in the form, in a combined condition like this:
( ref: https://toolset.com/documentation/user-guides/cred-conditional-display-engine/ )


[cred_show_group if="( $(momentoestudioextraccmuestraensayo) eq '7' ) OR ( $(momentoestudioextraccmuestraensayo) eq '8' )" mode="fade-slide"]

<div class="row">
	<div class="col-md-4">
		<label>Codigo Redcap(Si no se dispone de uno, haz <a href="<em><u>lien caché</u></em>" target="_blank" rel="noopener noreferrer">CLICK AQUI</a> para generarlo)</label>
	</div>
	<div class="col-md-4">
		[cred_field field='muestraredcapcode' force_type='field' class='form-control' required="true" output='bootstrap']
	</div>
</div>

[/cred_show_group]

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

regards,
Waqar