You need to sign in to do that
Don't have an account?

Get Hidden Field Value in Apex Class
I have an <apex:fieldHidden id="abc" /> on my VF form. I set a value in this field on onSubmit of form. But I am unable to get to way to get this value in my apex class.
Any help please.
Regards,
Rao
Bind the value of hidden field with a property on controller
<apex:hidden value="{!hiddenValue}" />
public Controller() {
public string hiddenValue {get;set;}
}
All Answers
Bind the value of hidden field with a property on controller
<apex:hidden value="{!hiddenValue}" />
public Controller() {
public string hiddenValue {get;set;}
}
Thanks Sham, Issue resolved.
Here goes the precise code:
<apex:page controller="TestControllerDev" showHeader="false" id="testC"> <apex:form id="pixelReqForm"> <apex:inputHidden id="txtURL" value="{!hiddenField}"/> </apex:form> </apex:page> Controller: ------------ public class TestControllerDev { private String hiddenField = 'TestValue'; public String getHiddenField() { return hiddenField; } public void setHiddenField(String data) { hiddenField = data; } }
I've added the following line to my visualforce page, and now am trying to work out your controller code to work for my use case (I want the Invoice_Internal_Id__c to populate a return URL on a save action.
Formula Expression is required on the action attributes.