This topic is locked
[SOLVED]

 Change read only before going back to list

6/2/2008 3:50:02 AM
PHPRunner General questions
R
roadyx author

Hi There,
I have an edit form where I have a readonly field and would like to change its value before saving to the database.
I tried assigining a new smarty value to it but it remains unchanged in the db after a save.
Is there any way to modify a read-only value without fetching the db record itself?
If I undo the read-only and put a default value, the user sees it but is able to modify. I would like to avoid that.
TIA!

J
Jane 6/2/2008

Hi,
use Edit page: Before display event to change readonly field.

Here is a sample:

global $readonlyfields;

$readonlyfields["FieldName"] = "your value";

R
roadyx author 6/2/2008

Hi,

use Edit page: Before display event to change readonly field.

Here is a sample:


Hi Jane,

You are always there to help! I work for a large company and bought this software for personal use. I'm so happy with ur support and forums that I've been telling everybody in my company to use your product!