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; 10-24-2024, 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


          • #9
            Many thanks Kharg for the quick implementation

            Comment


            • Kharg
              Kharg commented
              Editing a comment
              I will probably release a new update with the other features that have been requested before the end of the year

              Let me know how you like the new update!

            • ChrisSka83
              ChrisSka83 commented
              Editing a comment
              The new update is great, does exactly what was missing. Thank you.

              Only with this additional function “Quickcreate” I have not yet found any benefit.
              I have understood that I can use it to create faster. But you have to enter the complete address, i.e. with https:// etc...
              But you would have to fill it with content for each entry, or just provide it with a standard entry.
              Or have I missed the point?

            • Kharg
              Kharg commented
              Editing a comment
              It’s still in “beta”, what I’d like to do is for it to copy the relevant data already, for email it should take the address already if a button is added in contact for example.
          Working...
          X