1

Is it possible to pass a parameter through a URL to an input field on a Visualforce page? It would be like pre populating a field, but in this case it would be hidden.

  • 1
    Yes you can with the help of a controller. It acts as other input fields but not visible. developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/… – highfive Apr 27 '16 at 3:51
  • are you trying to avoid initializing fields via a controller and trying to do this with URL hacking? -- and, if you have a controller, with access to the value from apexPages.currentPage().getParameters().get('fooParm') - why do you need the hidden field at all? – cropredy Apr 27 '16 at 4:39
2

you can input your parameter via URL like ap2.salesforce.com/vfPages?id=01Z90000000EkUk for example

and you can add this Id testId = ApexPages.CurrentPage().getparameters().get('id') to get the parameter from url then you can put the testId to hidden input field that you want

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.