-2

i want to get the edited Input Field value.i don't want to use HTML tag.How can i achieve this ?

1
  • that's not a good question or something you couldn't figure out on your own. Sep 14 '15 at 9:25
0

There are lots of ways to do this. Below is a sample code to get the data in input field.

**Visual force Page:**

<apex:page standardController="yourController">
    <apex:form>
        <apex:pageBlock title="My Content">
            <apex:pageBlockButtons>
                <apex:commandButton action="{!yourMethod}" value="Pass your data"/>
            </apex:pageBlockButtons>
            <apex:pageBlockSection title="My Content Section" columns="2">
                <apex:inputField value="{!yourInputFieldVariable}"/>
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>

Class

public class yourController {
  public String yourInputFieldVariable {get;set;}

  public void yourMethod() {
    System.debug('This is your input field value' + yourInputFieldVariable);
  }
}

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