0

How to get multiple values in a single input field in vf page in salesfroce?

something like this <apex:inputField value="{!LeadFValues.{!value}}" />

  • 1
    what do you mean get multiple values in a single input field ? – Ratan Paul Jan 17 '16 at 14:31
  • Assuming LeadFieldValues is a single object your format is incorrect. Once you use the ! you do not use it again so it would be like this {!LeadFieldValues.value} – Eric Jan 17 '16 at 17:11
  • basically my requirement is, i have a picklist in which there are certain fields of Lead object, now once user select any fields from the picklist i want to use that selected field's api value here "{!LeadFieldValues.SELECTEDFiledApiValue}"...and this will happen at run time... – Faiz Jan 17 '16 at 18:08
  • Just a wild suggestion, is it possible to use different inputField tags for the different picklist values, but display only one of them at a time based on the value of the picklist. Thanks – Prajith Jan 17 '16 at 18:22
  • multiple inputField with rendered= attribute to ensure only one is visible based on prior selection is probably the VF-intended solution – cropredy Jan 17 '16 at 18:58
0

I think following will help you

<apex:inputField value="{!LeadFValues[value]} "/>

assuming 'value' is the SELECTED Field Api Value and LeadFValues a instance of Lead object.

I have not tried this solution, but found reference to this similar to your need. so thought it will help you.

See for more information https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_dynamic_vf_sample_standard.htm

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.