Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Pages - Customize & Extend
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.

 

 

 

  • Verified answer
    PurdyeS Profile Picture
    88 on at
    Re: Javascript - Set field value based on another field
    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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >

Featured topics