Is there a solution to be able to specify labels for fields in Single Type or Collection Type. Actually, the “name” of a field is the “internal” name (present in REST results) but it is also the label for the field, displayed for the user, it cannot contains space or special characters, and it could be more friendly to be able to specify a different text for the label than the field name.
Hi Xnopre,
Welcome to the Strapi Community,
I use a dash between words when naming fields: address_line_1, which Strapi will display the label as Address_line_1, not the best in case of labels, but makes it easy enough to read. also be aware that the negative part of using underscores in names are that underscores are also used for filters on REST, which can cause errors sometimes.
Thank you for your answer ! And good news ! I had seen and used the “Configure view”, but never seen that we can click on each field, with the possibility to set the label (my question), a description (good feature !), and a placeholder. Very good news !
But, if I’m not mistaken, this informations are only configurable online and stored in the database. Is it possible to set this informations in the code, as a developer ? without having to set this informations online (for a new field for example, to come with its label, description, and placeholder) ?
Not directly no but we do have a config dump/restore that dumps these (and only these for now + plugin settings) into a json format. See the following documentation for the CLI commands: