Placeholder for an input field?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ChrisSka83
    Senior Member
    • Apr 2023
    • 197

    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.​
  • emillod
    Active Community Member
    • Apr 2017
    • 1405

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

    Comment

    • esforim
      Active Community Member
      • Jan 2020
      • 2204

      #3
      Bug Kharg for feature

      *poke*

      Comment

      • shalmaxb
        Senior Member
        • Mar 2015
        • 1602

        #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.
      • ChrisSka83
        Senior Member
        • Apr 2023
        • 197

        #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
      • shalmaxb
        Senior Member
        • Mar 2015
        • 1602

        #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.
      • rabii
        Active Community Member
        • Jun 2016
        • 1250

        #7
        Originally posted by ChrisSka83
        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

        • Kharg
          Senior Member
          • Jun 2021
          • 410

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

          Comment

          • ChrisSka83
            Senior Member
            • Apr 2023
            • 197

            #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...