Form construction: which file writes the "ccm-required" span?

Permalink 1 user found helpful
I suppose I'm missing something obvious, but I simply cannot find the file that writes the <span class="ccm-required">*</span> part of the register form.

I'm looking because I'd ultimately like to add a similar conditional span for the "Displayed in Public Profile" option for registration form attributes.

I've seen the attributes helper file mentioned in several other threads; however, all of my my own helper files are nearly empty. Actually, /concrete/helpers/form/attribute.php has only one line:

class FormAttributeHelper extends Concrete5_Helper_Form_Attribute {}


I'm on v5.6.0.2. Did something about the helper files change? And, in any case, does anyone (anyone...anyone?) know where that span-generating code might live? I've been scanning php files for hours...

diorist
 
cubewebsites replied on at Permalink Best Answer Reply
You were close, just had to go to the parent class:
/concrete/core/helpers/form/attribute.php


I'm not sure what you are trying to accomplish though...when you have a User Attribute you can select if it's "Editable and Required in Profile" and "Require on Registration Form" and depending on which of the two options you choose you'll get the required span next to those fields on the relevant form fields.
diorist replied on at Permalink Reply
diorist
Yes! That's exactly what I'm looking for. Thanks, cubewebsites.

I'm trying ultimately to figure out how to add a new span that displays only if a custom attribute is defined with "Displayed in Public Profile." Since in the attribute definition form, that option is just a checkbox like the "Require on Registration Form" option, I'm hoping I can use the "*" insert code as a model for the new span.

Next up...figuring out how to define the "Displayed in Public Profile" variable and whether it'll work just to add an if-display-then-span function to attributes.php.