function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Jyotirupa DasJyotirupa Das 

I want to display specific contact name on checking the check box field in VF page

I want to display specific contact name on checking the check box field in VF page which should be in below format
'Anonymous '+case.country__r.Name+' Contact'
User-added imageCan anyone please help?
ANUTEJANUTEJ (Salesforce Developers) 
Hi Jyotirupa,

>> mstsolutions.com/technical/re-render-visualforce-page-forms-using-apexregion/#:~:text=without%20any%20issues.-,ApexRegion%20is%20a%20Visualforce%20page%20tag%20that%20is%20used%20to,avoid%20the%20required%20field%20issues.

The above link has an implementation that populates the input fields in the visualforce page based on the selected drop-down this you can modify to fit your use case.

Additionally, the example in documentation seems to be having a similar use case you can try checking this as well: https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_actionRegion.htm

I am adding the implementation below for quick reference:
 
<!-- For this example to render fully, associate the page
with a valid opportunity record in the URL.
For example: https://Salesforce_instance/apex/myPage?id=001D000000IRt53 -->
 
<apex:page standardController="Opportunity">
  <apex:form >
    <apex:pageBlock title="Edit Opportunity" id="thePageBlock" mode="edit">
 
      <apex:pageBlockButtons >
        <apex:commandButton value="Save" action="{!save}"/>
        <apex:commandButton value="Cancel" action="{!cancel}"/>
      </apex:pageBlockButtons>
 
    <apex:pageBlockSection columns="1">
      <apex:inputField value="{!opportunity.name}"/>
      <apex:pageBlockSectionItem>
      <apex:outputLabel value="{!$ObjectType.opportunity.fields.stageName.label}"
                        for="stage"/>
      <!--
           Without the actionregion, selecting a stage from the picklist would cause
           a validation error if you hadn't already entered data in the required name
           and close date fields.  It would also update the timestamp.
      -->
      <apex:actionRegion>
        <apex:inputField value="{!opportunity.stageName}" id="stage">
          <apex:actionSupport event="onchange" rerender="thePageBlock"
                              status="status"/>
          </apex:inputField>
          </apex:actionRegion>
      </apex:pageBlockSectionItem>
        <apex:inputfield value="{!opportunity.closedate}"/>
        {!text(now())}
        </apex:pageBlockSection>
 
      </apex:pageBlock>
    </apex:form>
</apex:page>

Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.  

Thanks.