| Index
» Projects
» phpMyEdit
» Forum
» Read only, not read only? |
 |
milos
Joined: 24 Mar 2004
Posts: 8
Posted: 2004-03-26 18:00
Back to top
Reply with quote
|
I am looking at the code, and see that when the field is "read only" you cannot write anything in that field with your PHP script. I think that this is not Ok.
I have a field UID that represents user who made last modifications to a record. This field should be shown to a user as read only. However, when I need to change this value before insert or update, I cannot because all "read only" fields are ignored! :(
Therefore, this should be changed with additional property (onchange_value or similar) to allow field value to be written.
|
milos
Joined: 24 Mar 2004
Posts: 8
Posted: 2004-03-26 18:11
Back to top
Reply with quote
|
| milos wrote: |
| However, when I need to change this value before
insert
or update, I cannot |
Correction, for insert 'default' works, but for update, there is no solution.
|
michal
Joined: 17 Jun 2003
Posts: 537
Location: Slovakia
Posted: 2004-03-26 18:46
Back to top
Reply with quote
|
see http://opensource.platon.sk/forum/projects/viewtopic.php?t=302 coping with the same.
|
milos
Joined: 24 Mar 2004
Posts: 8
Posted: 2004-03-26 19:27
Back to top
Reply with quote
|
It is not the same!!!
I need to show the value, and that value must be read only. I know that I can overwrite entered value (when it is not read only), but this is not what I am looking for.
|
milos
Joined: 24 Mar 2004
Posts: 8
Posted: 2004-03-26 19:39
Back to top
Reply with quote
|
The problem is that this
| Doug Hockinson wrote: |
How about 'input' => 'R' with something similar to
| Code: |
// Force over-writing date('Y-m-d') for col_name:
$opts['cgi']['overwrite']['col_name'] = date('Y-m-d');
|
|
Will not work, because of:
| Code: |
for ($k = 0; $k < $this->num_fds; $k++) {
if ($this->processed($k) && !$this->readonly($k)) { |
"if" does not allow UPDATE for read only fields.
|
|
Post new topic
Reply to topic
|
|
|
|