You need to sign in to do that
Don't have an account?
mmccauley
Set Value of Field
I'm trying to figure out if I can show a field based on the value of another field on the same record.
In my object I have a field that stores the API name of the field that needs to be rendered.
So for example...
Record 1 has Field__c has a value of Num_of_Users__c
Record 2 has Field__c has a value of Total_Spend__c
How can I create 1 line in a visualforce page that dynamically displays a input field where the value is that of Field__c?
<apex:inputField value="Result from Field__c" />
Thanks in advance!
Mark
I'm not sure I quite understand the question - are you trying to use the value from Field__c as the starting value for an input on another field?
Bob,
Yes you are correct.
So much depends on your exact situation, but the way I'd be tempted to handle it is to copy the value from field__c to other_field__c in the constructor of an extension controller, and then bind the input field to other_field__c as normal.