• Resolved Lars.Lemming

    (@larslemming)


    I want to use placeholders and not labels in my form, so the text is inside the entry box.

    Though I know that I under the Display settings of the fields can setup a Placeholder and under the Advanced Settings can set the label to hidden, this is apparently not the case for the “mandatory” * marking, which seems to stay above the entry box (where it is if you use labels)!

    Can any one advise me how I move the * marking inside the entry field together with the placeholder?

Viewing 1 replies (of 1 total)
  • Shaylee

    (@shayleehansen30)

    Hello @larslemming,

    To get that mandatory “*” inside the entry field alongside the placeholder, you’ll need a bit of custom work.

    Here are two options:

    Custom CSS: You can try the CSS solution provided above by adding it to your WordPress theme or a custom CSS plugin. Be sure to replace “.my-text-field” with the actual CSS class name of your text field and adjust the styling as needed.

    Each Ninja Forms field comes with a setting called Custom Class Names. This is where you can add classes to your field.

    /* Move the "*" inside the entry field */
    .my-text-field .nf-field-label:after {
        content: " *"; /* Add a space before the asterisk for spacing */
        color: red; /* You can change the color to your preference */
        display: inline-block; /* Ensures the asterisk is inline with the text */
        vertical-align: top; /* Adjust the vertical alignment if needed */
    }

    Professional Assistance: If CSS isn’t your thing or you require more complex tweaks, consider hiring a developer. We suggest checking out Codeable.io. They’re experts in WordPress and can create a customized solution that fits your specific requirements.

    Got more questions or need further assistance? Feel free to ask. We’re here to make your experience as smooth as possible!

Viewing 1 replies (of 1 total)

The topic ‘Lables and “mandatory” * marking’ is closed to new replies.