Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: TIWEdit Placeholder



Permlink Replies: 2 - Last Post: Nov 9, 2017 3:43 AM Last Post By: Jack Lee
Graham Murt

Posts: 70
Registered: 5/15/07
TIWEdit Placeholder
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 7, 2017 1:46 AM
Hi there,

I'm trying to add placeholders to my IWEdit components.

I do this by placing the following code in the TIWEdit.ExtraTagParams property...

  placeholder=email address


This works fine in Chrome and Safari but IE/Edge do not show the placeholders. I've found some fixes online relating to JQuery but I can't work out how to implement this into the Intraweb app. Has anyone got an idea of how to fix this issue?

Kind regards,
Graham
Chad Hower

Posts: 613
Registered: 3/2/07
Re: TIWEdit Placeholder
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 7, 2017 8:28 AM   in response to: Graham Murt in response to: Graham Murt
On 11/7/2017 5:46 AM, Graham Murt wrote:
I'm trying to add placeholders to my IWEdit components.

I do this by placing the following code in the TIWEdit.ExtraTagParams property...

   placeholder=email address


This works fine in Chrome and Safari but IE/Edge do not show the placeholders. I've found some fixes online relating to JQuery but I can't work out how to implement this into the Intraweb app. Has anyone got an idea of how to fix this issue?

Welcome to the horrible world of IE.

Maybe this is of use:
https://gist.github.com/jaywilliams/1105055

https://developer.mozilla.org/en-US/docs/Web/CSS/:-ms-input-placeholder

Edge is a lot better and should support placeholders. It might be this bug:

https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/3901363/

https://www.sitepoint.com/community/t/edge-browser-missing-placeholders-on-inputs/207611/2

Jack Lee

Posts: 26
Registered: 5/12/01
Re: TIWEdit Placeholder
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 9, 2017 3:43 AM   in response to: Graham Murt in response to: Graham Murt
Hi,

In IntraWeb, if you use JQuery, maybe you should:

1. place JQuery.js file into wwwRoot folder of your IntraWeb App.
2. In IntraWeb form's property: ExtraHeader, add your js file URL: <script type="text/javascript" src="/jQuery.js"></script>
3. In TIwForm.OnCreate event:
procedure TIWForm1.IWAppFormCreate(Sender: TObject);
var
jsString: string;
begin
jsString := 'my js code;';

Self.AddToInitProc(jsString);
end;

Then you can call your JavaScript code in IntraWeb.

Graham Murt wrote:
Hi there,

I'm trying to add placeholders to my IWEdit components.

I do this by placing the following code in the TIWEdit.ExtraTagParams property...

  placeholder=email address


This works fine in Chrome and Safari but IE/Edge do not show the placeholders. I've found some fixes online relating to JQuery but I can't work out how to implement this into the Intraweb app. Has anyone got an idea of how to fix this issue?

Kind regards,
Graham
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02