← Back to team overview

dhis2-devs team mailing list archive

Read only field on custom form

 

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 
<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


Follow ups