You are viewing limited content. For full access, please sign in.

Question

Question

User display name in JQuery

asked on February 20, 2020 Show version history

I have a field on a form whose default value is the user's display name, for example John Smith. This form is re-used multiple times, but once it has its value it does not change even if a different user submits it after John did. I want this to hold the display name of whoever is currently filling out the form.

I figured an easy way to do this would be to use JQuery to blank out the field, then fill it in with the current user's display name. However, I'm not sure how to access that display name through JQuery. Would anyone know how to access that, or is there a more robust way to ensure that the field always holds the current user's display name instead of only the first user who submitted the form?

 

Thanks

0 0

Replies

replied on February 20, 2020

I usually do this without javascript by doing the following:

  1. Create a current_user field that you will be hiding in field rules, make sure it has the current user token set as default value. Also in field rules, make sure it is set to Ignore field data and to be always hidden
  2. Create a current_user field that is visible and using calculations, point it at the previous field

 

3 0
replied on February 20, 2020

Hi Brian

Are you setting the Default value for the user name field using the following.

At the beginning of a form process, this would be auto-populated with the username who authenticated into Forms and submitted the original form.

This value will not change in the forms process once originally populated at submission as you work through the Business Process.

Is what you are looking for is for the value to change based on who the form is assigned too throughout the process?, "the form is re-used Multiple times" 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.