You need to sign in to do that
Don't have an account?
vandana raju
rendering visualforce page in html5
Hi
I have a visualforce with standard controller=account and doctype=HTML 5.0. when I enter acocunt Name and click save button it is not saving to object. please let me know if any issue.
Thanks
Pooja Hegde
I have a visualforce with standard controller=account and doctype=HTML 5.0. when I enter acocunt Name and click save button it is not saving to object. please let me know if any issue.
<apex:page docType="HTML-5.0" standardController="Account" standardStylesheets="false" showheader="false" sidebar="false"> <html> <head> </head> <body> <form> <table> <tr> <td> Account Name: </td> <td> <Input type="Text"/> </td> </tr> </table> </form> </body> </html> <apex:form > <apex:commandButton action="{!Save}" value="Save" /> </apex:form> </apex:page>
Thanks
Pooja Hegde
<apex:page standardController="Account" standardStylesheets="false" docType="html-5.0">
<apex:form>
<table>
<tr>
Please enter account Name
<td>
</td>
<td>
<apex:inputField value="{!Account.Name}"/>
</td>
</tr>
</table>
<apex:commandButton action="{!Save}" value="Save" />
</apex:form>
</apex:page>
All Answers
You have not bind account name input field on page. try below code.<apex:command> button will execute statndard Save method if it finds apex:inputfield tied to standard controller's field.
<apex:page docType="HTML-5.0"
standardController="Account"
standardStylesheets="false"
showheader="false"
sidebar="false">
<html>
<head>
</head>
<body>
<form>
<table>
<tr>
<td>
Account Name:
</td>
<td>
<apex:inputfield value="{!account.name}"/>
</td>
</tr>
</table>
</form>
</body>
</html>
<apex:form >
<apex:commandButton action="{!Save}"
value="Save" />
</apex:form>
</apex:page>
I placed the <apex:InputField> inside the <td> tag. But I am getting the error as : Error: <apex:inputField> (under <apex:page>) must occur between <apex:form></apex:form> tags. Please let me know
thanks
vandana
<apex:page standardController="Account" standardStylesheets="false" docType="html-5.0">
<apex:form>
<table>
<tr>
Please enter account Name
<td>
</td>
<td>
<apex:inputField value="{!Account.Name}"/>
</td>
</tr>
</table>
<apex:commandButton action="{!Save}" value="Save" />
</apex:form>
</apex:page>
its working.
thanks