Skip Navigation

[Resolved] Automatic Display of Asterisk for Required Fields

This support ticket is created 7 years ago. 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/Hong_Kong (GMT+08:00)

This topic contains 4 replies, has 2 voices.

Last updated by julieP 7 years ago.

Assisted by: Luo Yang.

Author
Posts
#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!