Adding required * to placeholder text
-
I would like to add a red * to the end of my placeholder text for required fields. I have tried to do this by adding a special class to the required fields. Then in the css file I am using the ::after selector to insert the * and make it red. However, it is not adding the star to the placeholder text.
Is this possible? If it’s not, is there any way to indicate that fields are required if I am only using placeholder text with no labels? I know I could just type my placeholder and add the star directly to the text, but my client wants the star to be red and the text to be gray.
- The topic ‘Adding required * to placeholder text’ is closed to new replies.