This topic is locked

Performing some formatting before adding record

4/8/2007 11:28:10 PM
PHPRunner General questions
K
karen price author

Hi,
I would like to know whether it is possible to perform some formatting on the input entered by users before adding them to the database.
For eg, the user might enter a date and a name and I can use this input to generate a unique identifier for the record
Would that be possible? Thanks.

Alexey admin 4/9/2007

Hi,
use Before record added event for this.

$values array there contains values to be written to database.

Here is the sample code:

$values["identifier"]=$values["name"]."-".$values["date"];



where identifier, nameand dateare your actual field names.

Please note that field names are case-sensitive here.