Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Nigel Wilson 944 posts 2076 karma points
    Jul 12, 2021 @ 00:38
    Nigel Wilson
    0

    Customise placeholder text when creating a new node

    Hi there

    When creating a new node there is the placeholder text of "Enter a name...".

    Wondering if it is possible to override this somehow / someway ?

    And if it is possible, can it then be specific to a specific document type ?

    The reason for asking is I would like to have some more helpful text be displayed, e.g. "Enter a name - this will be the promotion name in the query string"

    The alternative is to simply add a label at the top of the properties on the doc type with the helper information.

    Cheers

    Nigel

  • Marc Goodson 2141 posts 14344 karma points MVP 8x c-trib
    Jul 12, 2021 @ 06:21
    Marc Goodson
    100

    Hi Nigel

    There are a few options, but have a look first at the package called 'Contentment'.

    https://our.umbraco.com/packages/backoffice-extensions/contentment/

    It contains lots of really good additional property editor functionality, one of which is a textbox that will support HTML5 attributes such as the placeholder text:

    https://github.com/leekelleher/umbraco-contentment/blob/develop/docs/editors/text-input.md

    In term of adding notes above the properties, then contentment does have an enhanced form of the label property editor, that allows you to display text in a panel just above the property editor...

    ... and I am biased, but there is also the Editor Notes package:

    https://our.umbraco.com/packages/backoffice-extensions/editor-notes-v8-aka-ueditornotes/

    that allows for collapsible notes, or to have the information open up in a slide out panel.

    Finally, whenever a page is loaded to edit in the Umbraco backoffice - just before it is displayed the EditorModelEventManager fires a SendingContentModel event, that you can subscribe to handle in code.

    https://our.umbraco.com/Documentation/Reference/Events/EditorModel-Events/#usage

    This gives you reference to all the properties that are about to be displayed and their values, and the current logged in user, so you can write code to update things like labels or set default values.

    But hopefully all you need for your description above is 'Contentment'

    regards

    Marc

  • Nigel Wilson 944 posts 2076 karma points
    Jul 12, 2021 @ 09:08
    Nigel Wilson
    0

    Thanks Marc for your extremely detailed and thorough response - truly appreciate the time taken.

    I will have a good browse at the options detailed, but like the idea of the EditorModelEventManager.

    In looking at your suggestions tho I was impressed with both packages developed - such an awesome community with highly skilled people contributing - nice one.

    Cheers

    Nigel

  • Chriztian Steinmeier 2798 posts 8788 karma points MVP 7x admin c-trib
    Jul 12, 2021 @ 07:52
    Chriztian Steinmeier
    1

    Hi Nigel,

    I second all of Marc's suggestions — I have one additional proposal, as I get the gist that you're seeking to specifically change the placeholder in the "Umbraco Name" field:

    If you have a look in the ~/Config/Lang/ folder, you'll see a bunch of XML files - open en-US.user.xml and add your override for any specific key, like this:

    <language>
       <area alias="placeholders">
          <key alias="entername">Name your document here...</key>
       </area>
    </language>
    

    There's a page here on Our about localizing misc. parts of Umbraco.

    Please note that you won't be able to customize this per document type this way though...

    Hope that helps,

    /Chriztian

  • Nigel Wilson 944 posts 2076 karma points
    Jul 12, 2021 @ 09:09
    Nigel Wilson
    0

    Thanks Chriztian - I did not know these settings existed, so whilst my requirement is too specific in this case, definitely worth a look-see so as to be aware in the future if needed.

    Nice one

    Nigel

Please Sign in or register to post replies

Write your reply to:

Draft