Nik,
If it is a text field you can do something like this to pad the leading zero's.
// form1.page1.tf::exit - (JavaScript, client)
if (this.rawValue != null) {
var tf = this.rawValue;
if (tf.length < 6) {
var diff = 6 - tf.length;
for (var i=0;i < diff;i++) {
tf = "0" + tf;
}
this.rawValue = tf;
}
}
If it is a numeric field you can use a display pattern of num{999999}.
Steve