Need pro's help. Below are my code snippets. This is what I have tried I have initialized the object Event_Request__c {get; set;} in my controller class. I have created a public method to update the Event Request record. On saving, the VF page and Class both are being saved successfully. However, I am not any data. Please advise what is it that am missing.
Input Field and Commandbutton on VF page:
Input field
<div class="form-group">
<label for="WBS">WBS:</label>
<input type="text" placeholder="WBS" class="form-control" id="{WBS}" />
</div>
SubmitRequest Button
<apex:form>
<apex:commandButton action="{!updateEventRequest}" reRender="pageId" id="SubmitRequest" value="Submit Request" >
<apex:param id="InputWBS" value="{WBS}"></apex:param>
</apex:commandButton>
</apex:form>
Controller class method
public PageReference updateEventRequest() {
sEventRequest.WBS__c= ApexPages.currentPage().getParameters().get('WBS');
System.debug('The id for update is WBS = ' + sEventRequest.WBS__c);
update sEventRequest;
return null;
}