Skip to main content

I was wondering if it is possible to default the current user in a People and Group field, and the days date in a date field, ONLY when a certain choice is selected. 

For Example:

194272_pastedImage_1.png

When the "Buyer Status" is set to "Completed", I would like "Buyer Completed By" and "Buyer Completed Date" to auto-populate with the current users name and the days date automatically. I know it would be possible to do within the workflow, but I'm interested in doing it at the moment it is done. Thanks in advance. 

to achieve your requirement you will need to build small javascript.

basically, you need to define customized onchange handler for status dropdown.

withinh the handler you have to set the other two controls.

an example how to set date control you can find eg. here  

to set buyer completed by control is important to know what type it is of - people&group or simple text control?


It is a People and Group type


ok.

for how to set people&group control from javascript have a look on PP API and add() function usage example.


Reply