visualforce page
<apex:page Controller="AddAccountCntrlr" >
<apex:form>
<apex:pageBlock title="Add Account" >
<apex:pageBlockButtons>
<apex:commandButton value="Save" action="{!Save}" />
</apex:pageBlockButtons>
Name <apex:inputText value="{!name}" /><br/><br/>
Phone <apex:inputText value="{!phone}" /><br/><br/>
Account<br/> Number <apex:inputText value="{!accountNumber}" /><br/><br/>
Industry <apex:inputText value="{!industry}" />
</apex:pageBlock>
</apex:form>
I want to display industry as a picklist field
Industry <apex:inputText value="{!industry}" />
controller
public class AddAccountCntrlr {
public String name{get;set;}
public String phone{get;set;}
public String industry{get;set;}
public String accountNumber{get;set;}
public pagereference save(){
Account acc = new Account(name=name, phone=phone, industry=industry, accountnumber=accountnumber);
insert acc;
String accId = acc.Id;
return null;
}
public List<Account> getnewAccountTable(){
return accTable;
}
}