This topic is locked

hidden fields

6/3/2008 6:13:23 AM
PHPRunner General questions
E
echo author

how to achieve with phpr. i have a hidden field in the list page that is of the type:
<input type="hidden" name="status" value="1">
what i would normally do when the form is submitted when i code manually is to do something like:
$status = $_POST['status'];

$_SESSION['status'] = $_POST['status'];

this then creates the session and then do the db entry:
$status = $_SESSION['status'];

$query = 'INSERT INTO `files` (`id`, `status`) VALUES (NULL, \''.$status.'\');';
i am strugggling to see how to do this in phpr? this is only a simple example for the purpose of illustration and to give you an idea of what i am trying to achieve. thank you.

E
echo author 6/3/2008

sorted it myself

K
kamil6x 11/20/2008

Can you share how?

sorted it myself

K
kamil6x 11/20/2008

Found the answer:
Hi,
just remove this field from the add page on the Choose fields tab, then assign default value in the Before record added event on the Events tab.

Here is a sample:

QUOTE

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

Can you share how?