web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Javascript - Set field...
Power Pages
Answered

Javascript - Set field value based on another field

(0) ShareShare
ReportReport
Posted on by 88

Hi All,  Apologies my Javascript isn't the best, still learning...

 

In Power Pages I have a Basic Form on a table/entity called "Application" with text fields "Address" and "PostalAddress", and a Yes/No Field called "CopyAddresstoPostal".  So if the user types in an Address and toggles the "Yes/No" field it should just copy the "Address" value to the "Postal Address" field.  I've tried lots of different ways but cant get this to work - nothing happens.  How can I achieve this please within PowerPages ?

 

In Portal Management I am in a Basic Form, Additional Settings, Custom Javascript.

 

 

 

Categories:
  • Verified answer
    PurdyeS Profile Picture
    88 on at
    worked it out document.getElementById("PostalAddress").value = document.getElementById("Address").value;

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Pages

#1
M Bilal Khan Profile Picture

M Bilal Khan 99

#2
Mohsin Ali Profile Picture

Mohsin Ali 37

#3
11manish Profile Picture

11manish 21 Super User 2026 Season 2

Last 30 days Overall leaderboard