Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

ViewModal readonly fields #2929


User avatar
0
nlshcc98765 created

The sample project and the Employee template that comes with ASP.Net Zero contains a "ViewModal" for Employees which has editable fields. The "View" should be readonly. The EditModal should be editable. Is there an example of a Read Only View Modal dialog where all the data (controls) are not input boxes ?


3 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    We don't have such an example as far as I remember but it is very easy to make an input readonly. You just need to add readonly="" attribute to your input.

    You can check readonly inputs here <a class="postlink" href="http://keenthemes.com/preview/metronic/theme/admin_4_material_design/form_controls_md.html">http://keenthemes.com/preview/metronic/ ... ls_md.html</a>.

    Or you can use label elements instead of input elements if it fits your case.

    Thanks.

  • User Avatar
    0
    nlshcc98765 created

    Thank you for the quick reply. I just found it odd the "View" modal was allowing users to modify data. I also created a "Close" only modal (in addition to the cancelAndSave) for the Read Only "View" Modal and applied the Readonly tag and Class attributes. I'm also looking for 2 other examples for a standard dropdown list implementation and Date AND Time picker both within the modal. I'll post a separate thread for these.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    I think I couldn't understand your problem very well. AspNet Zero does not force you to edit data on view modals.

    Can you explain it a bit more detailed ?

    Thanks