← Back to team overview

dhis2-devs team mailing list archive

Re: [Dhis2-users] Read only field on custom form

 

Hi Alex,

 

Thank you very much that is working. 

 

Regards,

 

Elmarie Claasen

Hisp logo

Project Manager

Health Information Systems Program

Tel:      041-367 1027

Cell:     082 374 2209

E-mail:  <mailto:elmarie@xxxxxxxx> elmarie@xxxxxxxx

Skype:  elmarie.claasen52 

 

 

This message and any attachments are subject to a disclaimer published at  <http://www.hisp.org/policies.html#comms_disclaimer> http://www.hisp.org/policies.html#comms_disclaimer .   Please read the disclaimer before opening any attachment or taking any other action in terms of this electronic transmission. 
If you cannot access the disclaimer, kindly send an email to  <mailto:disclaimer@xxxxxxxx> disclaimer@xxxxxxxx and a copy will be provided to you. By replying to this e-mail or opening any attachment you agree to be bound by the provisions of the disclaimer. 

 

From: Alex Tumwesigye [mailto:atumwesigye@xxxxxxxxx] 
Sent: 22 August 2016 09:03 AM
To: Elmarie Claasen
Cc: DHIS 2 developers; dhis2-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Dhis2-users] Read only field on custom form

 

Dear Elmarie,

 

Please try 

 

<input readonly="true" disabled="disabled" ng-disabled="true" />

 

Alex

 

On Sun, Aug 21, 2016 at 11:27 PM, Elmarie Claasen <elmarie@xxxxxxxx> wrote:

Hi all,

 

I am using 2.23 revision 23051 2016-08-03 17:41

 

I have a custom form for which I want data element value to be read-only. 

 

I have tried various ways but cannot seem to find the exact fit. Current source code is like this: 

 

<p><input id="HTwM8OvNS49-T450li7DyUU-val" readonly="readonly" title="HTwM8OvNS49 - Inpatient discharges - total (finyear) - T450li7DyUU - default - NUMBER" value="[ Inpatient discharges - total (finyear) default ]" /></p>

                                             </td>

 

Also tried readonly=”true” which does seem to work halfway because it still allows the removal and editing of the value but does not store the changed value and then gives a “Data stored offline” message in the UI and asking if you want to sync the offline data. If you say yes it just runs and runs. Only way to clear the message is to clear browser cache. We don’t really want to use this option because then we need to teach them to clear browser cache when they still have data stored offline to get rid of that message which is contrary to usual training. 

 

Can anyone assist with the code to make the data element value read only on a custom form please?

 

Regards,

 

Elmarie Claasen

Hisp logo

Project Manager

Health Information Systems Program

Tel:      041-367 1027

Cell:     082 374 2209

E-mail:  <mailto:elmarie@xxxxxxxx> elmarie@xxxxxxxx

Skype:  elmarie.claasen52 

 

 

This message and any attachments are subject to a disclaimer published at  <http://www.hisp.org/policies.html#comms_disclaimer> http://www.hisp.org/policies.html#comms_disclaimer .   Please read the disclaimer before opening any attachment or taking any other action in terms of this electronic transmission. 
If you cannot access the disclaimer, kindly send an email to  <mailto:disclaimer@xxxxxxxx> disclaimer@xxxxxxxx and a copy will be provided to you. By replying to this e-mail or opening any attachment you agree to be bound by the provisions of the disclaimer. 

 

 

This message and any attachments are subject to a disclaimer published at http://www.hisp.org/policies.html#comms_disclaimer.  Please read the disclaimer before opening any attachment or taking any other action in terms of this electronic transmission.  If you cannot access the disclaimer, kindly send an email to disclaimer@xxxxxxxx and a copy will be provided to you. By replying to this e-mail or opening any attachment you agree to be bound by the provisions of the disclaimer.


_______________________________________________
Mailing list: https://launchpad.net/~dhis2-users
Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp





 

-- 

Alex Tumwesigye

 

Technical Advisor - DHIS2 (Consultant),
Ministry of Health/AFENET  | HISP Uganda

Kampala

Uganda
+256 774149 775, + 256 759 800161

Skype ID: talexie


IT Consultant (Servers, Networks and Security, Health Information Systems - DHIS2, Disease Outbreak & Surveillance Systems) & Solar Consultant


"I don't want to be anything other than what I have been - one tree hill "


-- 


*This message and any attachments are subject to a disclaimer published at 
http://www.hisp.org/policies.html#comms_disclaimer 
<http://www.hisp.org/policies.html#comms_disclaimer>.  Please read the 
disclaimer before opening any attachment or taking any other action in 
terms of this electronic transmission.  If you cannot access the 
disclaimer, kindly send an email to disclaimer@xxxxxxxx 
<disclaimer@xxxxxxxx> and a copy will be provided to you. By replying to 
this e-mail or opening any attachment you agree to be bound by the 
provisions of the disclaimer.*

PNG image


References