Web form set user and submission time

Hi guys,

I’m new to ERPNext. I want to create a simple check list web form I manage to create it OK. I want to add data to the form about which user who submitted the form, and when.

I create submitted_by and submitted_time fields in the doc type, add them (as hidden) in the web form, and add the following snipeets to the custom script part of the web-form. However, when I try to submitt the form they are not filled. Any ideas on what might be wrong?