Announcement

Collapse
No announcement yet.

Placeholder for an input field?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Placeholder for an input field?

    Hello everyone,

    Is there an attribute that can be used as a placeholder for an input field?
    The background:
    I use the link button extension from Kharg, I hide the title and so on, so that only the button is visible.
    But if there is no link yet or if I create a new entry, I have an empty field and my colleagues may not know what to put in there.

    I already have it with “placeholder”: “Link”
    but without success.

    Tried in the following files:
    custom/Espo/custom/Resources/layouts/ENTITY/detail.json
    and
    custom/Espo/custom/Resources/metadata/entityDefs/ENTITY.json

    Many thanks for a hopefully positive answer.​

  • #2
    Hello,
    you should create custom view for the field and in tpl you'll be able to specify a placeholder

    Comment


    • #3
      Bug Kharg for feature

      *poke*

      Comment


      • #4
        Not the most beautiful solution, but perhaps:

        Use formula

        ifThen
        (link == null,
        link = 'placeholder'
        );

        In edit mode the field will be filled with "placeholder". In view mode, the button is visible.
        Last edited by shalmaxb; Yesterday, 09:46 AM.

        Comment


        • ChrisSka83
          ChrisSka83 commented
          Editing a comment
          I had already thought of this, but unfortunately this field only accepts links, not plain text.

      • #5
        Kharg Could this be implemented somehow in the settings?

        Comment


        • Kharg
          Kharg commented
          Editing a comment
          Maybe an additional option such as “display label if field is empty”?

        • ChrisSka83
          ChrisSka83 commented
          Editing a comment
          or in the settings in the Entity Manager an additional field: Placeholder

      • #6
        Tested right away again and it works with text.

        Comment


        • ChrisSka83
          ChrisSka83 commented
          Editing a comment
          I always get “invalid” and the field for the button is outlined in red.

      • #7
        Originally posted by ChrisSka83 View Post
        Hello everyone,

        Is there an attribute that can be used as a placeholder for an input field?
        The background:
        I use the link button extension from Kharg, I hide the title and so on, so that only the button is visible.
        But if there is no link yet or if I create a new entry, I have an empty field and my colleagues may not know what to put in there.

        I already have it with “placeholder”: “Link”
        but without success.

        Tried in the following files:
        custom/Espo/custom/Resources/layouts/ENTITY/detail.json
        and
        custom/Espo/custom/Resources/metadata/entityDefs/ENTITY.json

        Many thanks for a hopefully positive answer.​
        Yon can customise the input field type you want and add a new parameters to add placeholder.
        Rabii
        Web Dev

        Comment


        • #8
          ChrisSka83 version 1.6.0 released with placeholder and quickcreate features.

          Comment

          Working...
          X