Page 1 of 1

Auto Generating a Number and Insert into Field

Posted: Sun Oct 09, 2016 4:48 pm
by mrcali

Hello,

Here's a tip on how to auto generate a number and inserted it into a hidden field when you are making a new record, this is basic stuff but it is not readily apparent in the manual. Put this in the Row Inserting section of the Server Scripts, Client Scripts and Custom Templates Tab. Also make sure not to make the field editable if you never want to change the randomly generated number.

$randomnumber = rand();
$rsnew['fieldname']="$randomnumber";