Search The ForumSearch   RegisterRegister  LoginLogin

AfterLogic WebMail Lite 7

 AfterLogic Forum : AfterLogic WebMail Lite 7
Subject Topic: Disable fields in Edit Contact Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
rudolf.riegler
Newbie
Newbie


Joined: 12 November 2012
Online Status: Offline
Posts: 18
Posted: 24 November 2012 at 9:36am | IP Logged Quote rudolf.riegler

Hy,

for my web-application I have to disable (set read only) some fields in the Edit-Contact form, e.g. fields in the groups Home, Business and Other.

Is it possible and how to do this??? Thanks in advance for a reply.

best regards
Rudi
Back to Top View rudolf.riegler's Profile Search for other posts by rudolf.riegler
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 26 November 2012 at 3:58am | IP Logged Quote Igor

Are you speaking of ASP.NET or PHP version of WebMail Lite?

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
rudolf.riegler
Newbie
Newbie


Joined: 12 November 2012
Online Status: Offline
Posts: 18
Posted: 26 November 2012 at 8:05am | IP Logged Quote rudolf.riegler

Igor wrote:
Are you speaking of ASP.NET or PHP version of WebMail Lite?


Ohhh...sorry...ASP.Net!!!!
Back to Top View rudolf.riegler's Profile Search for other posts by rudolf.riegler
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 26 November 2012 at 8:55pm | IP Logged Quote Igor

There might be several ways to achieve that. The most straightforward one is as follows. Locate the file js\contacts\edit-contact.js, it's where those fields are created.

Let's assume you need to lock Business Email field. Locate the code where it's created:

Code:
          td.innerHTML = Lang.BusinessEmail + ':';
          WebMail.LangChanger.Register('innerHTML', td, 'BusinessEmail', ':');


A few lines after that, input element is created:

Code:
          inp = CreateChild(td, 'input', [['type', 'text'], ['class', 'wm_input'], ['size', '45'], ['maxlength', '255']]);


As you can see, several attributes are assigned there. Add readonly attribute to them:

Code:
          inp = CreateChild(td, 'input', [['type', 'text'], ['class', 'wm_input'], ['readonly', 'readonly'], ['size', '45'], ['maxlength', '255']]);


You'll probably need to purge browser cache to make sure changes in the code are applied.

Hope this helps!

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide