Is there an appetite for the addition of labels for attributes? I have a registration form which has a lot of User Attributes and some require a bit longer explanation than just the name of the attribute. Birth dates have been troublesome for decades because inevitably, folks forget one of the elements, particularly the year of birth so everyone is born in 2025. So, I’ve reworked the Register page and the basic stuff can have descriptors added to the Form section but as soon as the foreach loop starts to go through the additional Member Attributes, it’s difficult to isolate specific attributes to add descriptive text to it. In the Birth Date example, I have had to change the actual name of the Date attribute to:
‘Birth Date (click the field below and select the year first then the month and then the day)’
in order to display more helpful text. This is certainly a hack that a label could solve.
Or, I’m just doing this attribute thing wrong which is a possibility.
Hi Michael,
I support the idea of having flexible labels for adding attributes. That would be an enormous help for UI/UX. As a “hack” I hardcode the display of attributes in the page template. It gives a nice, stylable label above the entry.
Oh, I can certainly build something quite nice out of attributes but if I add an attribute then I need to hit the PHP again which kind of defeats the purpose of a user-friendly CMS. The looping through all the attributes is where I need a label to display that’s set in the back end. I’ve had to resort to a bunch of IF statements inside the loop to pick off certain attributes and display special instructions but that solution is not available to non-coders which is the audience we serve.
@CoDa_ZRH Your code example is purely for the display of attributes, correct? I’m wishing to add better instructions to the input side of things by adding labels.
In my code example: If you add another unique class to the paragraph-tag, like label-title, label-topic, label-serial, then you can use it in JS, doing a lot of things like conditional instructions etc.