Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Duplicate field via script, not global binding

Avatar

Avatar
Validate 1
Level 1
fogharty
Level 1

Likes

0 likes

Total Posts

17 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
fogharty
Level 1

Likes

0 likes

Total Posts

17 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
fogharty
Level 1

31-03-2021

I have a form where we need a field on one page to be autofilled with the text entered in another.

The difficulty is we need to allow the user to be able to override the second, autofilled field if need be, so using the same field name and setting binding to global doesn't allow for that.

 

I've tried putting a script in set to calculate.

 

First field is Year1_text.   Value is User Enter-Required

Second field (to be autofilled) is Year1.  Value is set to Calculated-User Can Override

Language is set for Javascript

 

script on Year1 field is:

this.rawValue=Year1_text.rawValue

 

I can't seem to get it to work.

autofill binding Duplicate global javascript

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Establish
Employee
Kosta_Prokopiu1
Employee

Likes

132 likes

Total Posts

310 posts

Correct Reply

87 solutions
Top badges earned
Establish
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile

Avatar
Establish
Employee
Kosta_Prokopiu1
Employee

Likes

132 likes

Total Posts

310 posts

Correct Reply

87 solutions
Top badges earned
Establish
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile
Kosta_Prokopiu1
Employee

31-03-2021

This is something I woul place in the exit event of the first field. It also depends under which conditions field 2 should be filled by field 1.

Here is an example where I only fill field 1 if it is still empty, once filled with the same or a different content it will not be overwritten again.

I do this in the exit event of field 1 - as soon as the user steps out of the field it will be executed.

See if this works for you

Kosta_Prokopiu1_0-1617259597911.png

 

   

Answers (0)