Skip Navigation

[Résolu] Automatic Display of Asterisk for Required Fields

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

Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.

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/Hong_Kong (GMT+08:00)

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

Dernière mise à jour par julieP Il y a 6 années et 12 mois.

Assisté par: Luo Yang.

Auteur
Publications
#594800

Is there a way of automatically displaying an asterisk next to the label text on the front end for fields that are set to be required?

#594983

Dear Julie,

I assume we are talking about the CRED form, it should be possible within some CSS codes, see similar thread here:
https://stackoverflow.com/questions/23141854/adding-asterisk-to-required-fields-in-bootstrap-3

For your reference.

#595045

Hi Luo

Yes, I do mean CRED forms.

Thank for the link. I've worked through this but it actually involves changing

<div class="form group">

to

<div class="form group required">

and

<label>

to

<label class="control-label">

in each instance of every form where a field is required. It would actually be easier to simply type an asterisk after the label text! Either way it means manually checking the form against the settings for the custom fields to make sure every required field has an asterisk.

Whilst the desired end result is achievable albeit it in a somewhat clumsy and potentially inaccurate way, what I was really wanting to know is whether there is a way of tapping into the custom field validation setting of 'required' to automatically generate an asterisk in all the right places.

Is this possible?

#595476

You are right, you will need to it actually involves changing HTML codes, there isn't such a built-in feature within CRED form, if you agree, we can take it as a feature request, our developers will evaluate.

#595480

Yes please!