PHP Classes

Display only fields

Recommend this page to a friend!

      PHP Forms Class with HTML Generator and JavaScript Validation  >  PHP Forms Class with HTML Generator and JavaScript Validation package blog  >  Locating addresses on...  >  All threads  >  Display only fields  >  (Un) Subscribe thread alerts  
Subject:Display only fields
Summary:formsgeneration
Messages:2
Author:herman lapre
Date:2014-02-08 12:45:18
Update:2014-02-10 08:34:40
 

  1. Display only fields   Reply   Report abuse  
Picture of herman lapre herman lapre - 2014-02-08 12:45:18
Hello,

I am new to this PHP classes forum and i have studied ur package, but i cant find an example for the following case:


How to display a read only field in a form, sothat a user can only see its generated e.g usernumber and is not allowed to do any input on that field.
e.g. auto-increment keys from the DB.



  2. Re: Display only fields   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2014-02-10 08:34:40 - In reply to message 1 from herman lapre
Usually that kind of field is hidden, but if you still want to show it for some reason, you can add it to the output using the function AddInputReadOnlyPart instead of AddInputPart. That makes the value be displayed instead of being editable. The actual value of the input is still added to the form as an hidden input.