3 Replies Latest reply: Mar 21, 2013 4:11 AM by Pavol-Oracle RSS

    How to include Placeholder in af:inputText component

    996589
      In the HTML5 there is property called *“placeholder”* it will act as watermark for the text box

      Below is syntax for the HTML

      <input type="text" name="fname" placeholder="First name">

      I need the same approach to solve the af:inputText tag is there any solution available.

      Please help me on this issues.
      Thanks in advance
        • 1. Re: How to include Placeholder in af:inputText component
          Pavol-Oracle
          Hi,

          I am no aware of any direct support for it in ADF, but I would try to use the CSS capabilities, something similar to: http://stackoverflow.com/questions/6136855/add-title-attribute-from-css

          Pavol
          • 2. Re: How to include Placeholder in af:inputText component
            996589
            Thanks Pavol.

            Link which you given as sample example and work around for label using jquery.

            Problem we facing for af:inputText command (input text) as follows

            approach
            we make the value field act as watermark.

            using clientlistner onfoucs clear the value
            using clientlistner onblur adding the watermark value.

            Problem we facing is how to support for multi language.
            During the post watermark value also passed to server.
            (Need to clear the text value before send to server if it watermark value. it is very complex task.since we need to check in every form and every field used in the application).

            Another scenario during editing already existing data or re-submit data value should be show to af:inputText command.
            how we can able to achieve it.

            Value should be either of the below one
            1) user enter value
            2) Fetched from DB. (for editing )
            3) Adding Water mark value.if it is null value from post or null value from DB data.


            it would be great help. Any configuration change to add attribute to af:inputText command
            • 3. Re: How to include Placeholder in af:inputText component
              Pavol-Oracle
              Hi,

              regarding Watermarks in ADF I have found a nice blog from Duncan Mills: https://blogs.oracle.com/groundside/entry/placeholder_watermarks_with_adf_11

              hopefully it helps.

              pavol