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

InputText tag in StandardController -VisualForce Page
Is there any possibilities to use inputText tag when we use 'StandardController ’ in visualForce page? If so, how to save the values which is inputText? Do I need to write/override save button functionality to achieve this?
Hi,
Try the below code snippet as reference:
<apex:page standardController="Contact">
<html>
<apex:form >
<table width="100%">
<tr>
<td><b>Contact Edit</b>
<apex:commandButton value="Save" action="{!save}"/>
</td>
</tr>
<tr>
<td colspan="2" style="background-color:Thistle ;"><b>Contact Information</b>
</td>
</tr>
<tr>
<td colspan="1"><apex:outputlabel >First Name</apex:outputlabel>
<apex:inputField value="{!contact.firstname}"/>
</td>
<td><apex:outputLabel >Last Name</apex:outputLabel>
<apex:inputText value="{!contact.lastname}"/></td>
</tr>
<tr>
<td>
<apex:commandButton value="Save" action="{!save}"/>
</td>
</tr>
</table>
</apex:form>
</html>
</apex:page>
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
Thanks,
If i get values from 'extensions' class, how can i save that value? will that code work for that case?
<apex:inputText id="op" value="{!selectedOptions}" style="vertical-align:top;"/>