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
Rakshana Cube84Rakshana Cube84 

Two forms in VF page

<apex:form id="form1"> .
some inputfields are here...
.. </apex:form>

 <apex:form id="form2">
<apex:commandButton value="Save & Continue" action="{!saveApplication}" id="saveButton" />
 </apex:form>
<script> jQuery('[id$=saveButton]').click(function(){
 jQuery('[id$=form1]').submit(); });
 </script>



This is not working for me. Please make me resolved 
Raj VakatiRaj Vakati
You need to do it as below and you can't consolidate as one .. 
 
<script>
    jQuery('[id$=saveButton]').click(function(){
        jQuery('[id$=frm2]').submit();
        jQuery('[id$=frm1]').submit();
        
    });
    </script>

 
Raj VakatiRaj Vakati
<apex:page standardController="Account">
    <apex:form id="frm1">
        <apex:pageBlock title="Insert Account  Record" id="pbAccountDetails">
            <apex:pageMessages ></apex:pageMessages>
            <apex:pageBlockSection >
                <apex:inputField value="{! account.Name }" />
                <apex:inputField value="{! account.Type }" />
                
                
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
    <apex:form id="frm2">
        <apex:pageBlock title="Insert Account  Record" id="pbAccountDetails">
            <apex:pageMessages ></apex:pageMessages>
            <apex:pageBlockSection >
                
                <apex:inputField value="{! account.Industry }" />
                <apex:commandButton value="Save & Continue" action="{!save}" id="saveButton" />
                
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js">
    </script>
    <script>
    jQuery('[id$=saveButton]').click(function(){
        jQuery('[id$=frm2]').submit();
        jQuery('[id$=frm1]').submit();
        
    });
    </script>
</apex:page>

 
Rakshana Cube84Rakshana Cube84
Raj - Thanks for responding. Still, this is not working. 
Raj VakatiRaj Vakati
It might night work because any one of your forms is not contained required fields..  

Its GOing to submit as two different actions and not as a single action 
Raj VakatiRaj Vakati
It might now work because any one of your forms is not contained required fields..