This topic is locked

Pre-populate Values

6/20/2007 2:19:42 PM
PHPRunner General questions
D
desowen author

Hi there
I'm using version 4.0 and I'm trying to learn how to pre-populate edit page values before the screen appears by using editpage -> BeforeShowEdit.
I tried using the following where lay_qst_long is the empty field / control I want to pre-populate with the text found in qst_long.
$values["lay_qst_long"] = $values["qst_long"];
The qst_long field / control is read only.
Probably a silly question but I'm stuck <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=5564&image=1&table=forumtopics' class='bbc_emoticon' alt=':rolleyes:' />
Best wishes from the UK.
Des

Alexey admin 6/21/2007

Des,
use this code in BeforeShowEdit event:

global $data;

$smarty->assign(value_lay_qst_long",$data["qst_long"]);