| Index
» Projects
» phpMyEdit
» Forum
» Read-only or hidden fields in triggers |
 |
KarelB
Joined: 01 Jun 2007
Posts: 24
Posted: 2008-06-15 15:08
Back to top
Reply with quote
|
All,
I am using phpMyEdit for quite sometime now and the following problem keeps cropping up.
I have a table with an ID field (primary key) and an ordernumber field that has an unique constraint followed by a number of fields.
I build my table with the following key statement
$opts['key'] = 'order_nr';
However the ordernr can be negative and if so I like to display a blank text instead of the number.
So in the List state I build a virtual colomn that displays the ordernr if positive other wise it is blank. I don't display the actual order_nr col.
In the change state I like to show the value of order_nr as a visual aid but it should not be editable.
After the change state i need to do an after trigger where i need the order_nr (or a copy of it) in the newvals variable.
But what ever i try with hidden fields or read-only fields voor the order_nr column it does not do what I want.
If i make the field hidden than the order_nr becomes 0, if i make it read-only it is not passed into the newvals array.
Anybody an idea what i should do to establish this.
I even tried to hack the read-only state in phpMyEdit class, but got stuck.
Cheers
KArel
|
|
Post new topic
Reply to topic
|
|
|
|