Foros de discusión

How To make aui input is read only?

thumbnail
angu manikandan, modificado hace 10 años.

How To make aui input is read only?

Junior Member Mensajes: 72 Fecha de incorporación: 16/07/12 Mensajes recientes
Hi,
How To make aui input is read only?

Thanks in Advance.
thumbnail
Atin Agarwal, modificado hace 10 años.

RE: How To make aui input is read only?

Junior Member Mensajes: 86 Fecha de incorporación: 20/02/12 Mensajes recientes
Use the attribute readonly and set this to true

<aui:input type="text" name="name" readonly="true" />

Regards,
Atin Agarwal
Manish Singh, modificado hace 9 años.

RE: How To make aui input is read only?

New Member Mensajes: 10 Fecha de incorporación: 22/08/14 Mensajes recientes
angu manikandan:
Hi,
How To make aui input is read only?

Thanks in Advance.



readonly attribute may not work on aui
use :
<aui:input name="name" disabled="true"/>

-
Regards
Manish Singh
Arun R S Chandran, modificado hace 9 años.

RE: How To make aui input is read only?

Regular Member Mensajes: 149 Fecha de incorporación: 12/03/13 Mensajes recientes
this may help you as well.
thumbnail
Ethan Bustad, modificado hace 9 años.

RE: How To make aui input is read only?

Junior Member Mensajes: 26 Fecha de incorporación: 23/08/12 Mensajes recientes
Manish Singh:

readonly attribute may not work on aui
use :
<aui:input name="name" disabled="true"/>


Keep in mind that "disabled" and "readonly" do two different things: both will prevent the user from editing the value in your input field, but "disabled" will also prevent the value from being passed as a request parameter on form submit, whereas "readonly" will allow the value to be submitted.

The readonly attribute is currently only applied to the aui:input tag if the "type" attribute is specified: if not, the readonly attribute won't show up in the markup.

Also note that readonly="false" still makes the input tag readonly - it's a property setting rather than a true xml attribute. So beware of trying to make a field readonly programmatically, based on some boolean field. It probably won't behave as expected.
thumbnail
Madhava Venganapalli, modificado hace 9 años.

RE: How To make aui input is read only?

Junior Member Mensajes: 26 Fecha de incorporación: 5/06/13 Mensajes recientes
give just aui input field as readonly="true".