function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sp13sp13 

How to get value of rich text area field

The code below works if you enter/select values on any other fields after entering BODY but if you enter/select values for all the other fields and enter text to the BODY last, it doesn't save / newIdea.Body returns null.
<apex:form>
    <apex:inputField value="{!newIdea.Title}" id="myTitle"/> <!--text field-->
    <apex:inputField value="{!newIdea.Body}" id="newText"/> <!--rich text field-->
    
    <apex:outputPanel id="form2">
        <apex:actionRegion >
            <apex:selectList value="{!selectedPostIdeaLineOfBusiness}" size="1">
                <apex:selectOptions value="{!LineOfBusinessValues}"/>
                <apex:actionSupport event="onchange" reRender="form2"/>
            </apex:selectList>
        </apex:actionRegion>
                                
        <apex:outputPanel rendered="{!selectedPostIdeaLineOfBusiness!=null && selectedPostIdeaLineOfBusiness!='Platform Solutions'}">
            <h2>Device/Channel</h2>
            <apex:selectRadio value="{!selectedPostIdeaDevice}" layout="pageDirection" rendered="{!selectedPostIdeaLineOfBusiness!=null}">
                <apex:selectOptions value="{!DeviceValues}"/>
                <apex:actionSupport event="onchange" reRender="form2, buttonFormId" action="{!validateButton}"/>
            </apex:selectRadio>
        </apex:outputPanel>
                            
        <apex:outputPanel rendered="{!selectedPostIdeaLineOfBusiness!=null}">
            <h2>Solution</h2>
                    <apex:selectRadio value="{!selectedPostIdeaCategory}" layout="pageDirection" rendered="{!selectedPostIdeaLineOfBusiness!=null}">
                        <apex:selectOptions value="{!CategoryValues}"/>
                        <apex:actionSupport event="onchange" reRender="form2, buttonFormId" action="{!validateButton}"/>
                    </apex:selectRadio>
        </apex:outputPanel>
    </apex:outputPanel>
</apex:form> 
                            
<apex:form > 
    <apex:inputFile value="{!newIdea.AttachmentBody}"/>
</apex:form> 

<apex:form id="buttonFormId">
    <apex:commandButton value="Post Idea" reRender="form2" action="{!postNewIdea}" disabled="{!disablePostButton}"/>
</apex:form>

//{!validateButton} == action for checking if all fields are !=null
//{!disablePostButton} == boolean; disable button until all fields are !=null
//{!postNewIdea} == insert newIdea;