From a user perspective, the 'How many people are you registering?' input, on the event registration form for multiple participants, is a required field. Therefore, it should have the red asterisk for continuity.

However, we can't just add the 'required' formRule to the element, because behind the scenes a '1' is a value of nothing (ie: no additional participants).

So what's the easiest way of adding the 'required' class to the element, without adding the form rule itself? It would be great to push this back to core, rather than us just overriding it in our CSS, even though it is a super-trivial improvement.

1 Answer 1


John - There's an existing pattern for simply add the markup to the template for cases like this, and I think it's fine for this situation. So in Register.tpl, just add this markup after the label:

<span class="crm-marker" title="{ts}This field is required.{/ts}">*</span>

Note that there was evidently some spots where this technique was used / but then removed in that file (see line 47). I think we can remove that {capture} statement at this point and just put the markup where it's needed.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.