Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Pages - General Discussions
Unanswered

populate system required field based on the answer of another field

(0) ShareShare
ReportReport
Posted on by 2

Hello
I'm using a basic form for the portal, which has a system required field for contact.

I need to set the contact either by the logged in user, which I have managed by using entity metadata.  However if the user is not logged in I would like the field to be populated from the answer of another field, answers would be anonymous or guest.  So if anonymous was selected the system required contact field would be populated with the anonymous contact.  If guest was selected the system required contact field would be populated with guest.

 

Contact field is system required and I am not able to alter this.


Is there a low code/no code way of doing this?

Any help or advice is greatly received.

Categories:
  • EmadBeshai Profile Picture
    806 Super User 2025 Season 1 on at
    Re: populate system required field based on the answer of another field

    Hi @BOB007 ,

     

    Since you have an anonymous contact record and you want to set it in case of select an anonymous option, then you can trigger the on-change function on the option-set and based on the selected value if it is equal to anonymous then set the anonymous contact like below

     

    $(“#contact_name”).attr(“value”,contactName); /*contact_name = record name*/
    $(“#contact”).attr(“value”,contactId); /*contactId= Guid of the record*/
    $(“#contact_entityname”).attr(“value”,”contact”);/*contact = entity name*/

     

     

    If this post helps you with your problem, please mark this answer as Accepted Solution.
    If you like my response, please give it a Thumbs Up. 

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 > Power Pages

#1
Fubar Profile Picture

Fubar 69 Super User 2025 Season 1

#2
oliver.rodrigues Profile Picture

oliver.rodrigues 49 Most Valuable Professional

#3
Jon Unzueta Profile Picture

Jon Unzueta 43