Hi Johan,
You might try some similar as the following:
local myFields = clientevent.form.fields
local curtime = os.time()
-- client.alert(curtime)
-- if you want to set value to a date field, you do not need to convert the curtim to string
mycurtimestring = os.date("%X" , curtime) -- if you like different format, please refer
www.lua.org/pil/22.1.html for detail
myFields["textboxField"].value = mycurtimestring
Kind Regards,
Yi