Skip to main content
RQ82
Inspiring
April 17, 2020
Question

Duplicate fields, but with different field names

  • April 17, 2020
  • 1 reply
  • 616 views

 

Hi all,

 

I have created an example of a field that duplicates what a user inputs. The name field is duplicated in the Policy name field, which is exactly what I need it to do.

 

https://drive.google.com/open?id=1K3C-aw2B8lE51l6xIXJ-yjX3vm2-MWK5

 

To do this, I added an On Blur/Run a JavasScript to othe Name field:

 

this.getField(event.target.name + "_2").value = event.value ;

 

To get the second field (which is Read Only) to populate, I had to name the field "Name_2"

 

My question is this: if I wanted to call the field "Policy Name" instead of "Name_2", is this possible? And, is therre any problem with a field name being multiple words with a space (Policy Name) vs no space (PolicyName)

 

Thanks in advance

 

 

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
April 17, 2020

Yes, you can call it whatever you want.

RQ82
RQ82Author
Inspiring
April 17, 2020

Thanks. I tried this:

 

this.getField(event.target.name + "Policy Name").value = event.value ;

 

But now I can't seem to get it to mirror any longer. 

 

Here is my updated example. where I changed the Policy Name field from "Name_2" to "Policy Name" 

 

https://drive.google.com/open?id=1i4ZKfs8u3PbR4Ly915ZhZQKPSQrsw3Lo

 

I'm sure I'm missing something simple and obvious but I can't put my finger on it. Any help is appreciated.

try67
Community Expert
Community Expert
April 17, 2020

Why are you adding the name of the source field? Just use:

this.getField("Policy Name").value = event.value;