Jump to content

[FYI] Custom Icon inside textbox

Recommended Posts

To add an icon that represents what you would like your user to put in a specific field, you can do the following:

  • Download image files that you would like to use as icons.
  • Create a FILE app parameter using the image that you downloaded.
  • Add a Header and Footer in your Datapage and disable the HTML editor.
  • In your Header, paste the following CSS script:
#InsertRecordFIELDNAME {
    padding-right: 33px;
    background-image: url(PUT_YOUR_APP_PARAMETER_HERE);
    background-position: 97% ;
    background-repeat: no-repeat;
    background-size: 20px;

Output: image.png.a8e49595ea17c7012e4d1fafaa88538d.png

Take note that the code above will put the icon on the right side of your text field. If you want it on the left, you can use the below CSS instead:

#InsertRecordFIELDNAME {
    padding-left: 33px;
    background-image: url(PUT_YOUR_APP_PARAMETER_HERE);
    background-position: 3% ;
    background-repeat: no-repeat;
    background-size: 20px;

Output: image.png.cb706c644cb34436834c6642008da5bf.png

Replace FIELDNAME with your own field name and do the same thing with the App parameter.

Also, the code above is used in a submission form, if you are using an update form you may need to change #InsertRecord to #EditRecord.


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...