PHP Classes
Icontem

Subject: Read-only field


  Search   All class groups All class groups   Latest entries Latest entries   Top 10 charts Top 10 charts   Newsletter Newsletter   Blog Blog   Forums Forums   Help FAQ Help FAQ  
  Login   Register  
Recommend this page to a friend!

      Forms generation and validation   All threads   Read-only field   (Un) Subscribe thread alerts  
Subject:Read-only field
Summary:Why is this summary field mandatory???
Messages:4
Author:Shmuel
Date:2008-11-16 11:56:09
Update:2008-11-18 08:03:55
 

  1. Read-only field   Reply  
Picture of Shmuel
Shmuel
2008-11-16 11:56:09
Hi,

How can I make an input field read-only (just one field, not the whole form)?

Thanks,
Shmuel

  2. Re: Read-only field   Reply  
Picture of Manuel Lemos
Manuel Lemos
2008-11-16 23:38:31
You can just add the input setting the ReadOnly attribute.

  3. Re: Read-only field   Reply  
Picture of Shmuel
Shmuel
2008-11-17 09:15:27
Hi,

I'm quite new to this, so could you please provide
a code for working example. Couldn't find it in the examples
provided with the class.

Thanks,

Shmuel

  4. Re: Read-only field   Reply  
Picture of Manuel Lemos
Manuel Lemos
2008-11-18 08:03:55
It is easy, just add an entry in the array that is passed to AddInput like this:

$form->Addinput(array(

... some attributes ...

'ReadOnly'=>1

));

 
  Advertise on this site Advertise on this site   Site map Site map   Statistics Statistics   Site tips Site tips   Privacy policy Privacy policy   Contact Contact  

For more information send a message to :
info at phpclasses dot org.
Copyright (c) Icontem 1999-2008 PHP Classes - PHP Class Scripts
  PHP Book Reviews - Reviews of books and other products