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 Visualforce page

Hi Everyone,
I need a help to resolve on handling two forms in VF page. The scenario is I have a couple of input field in one form1 and have set of script code after the form. So I took a new form to display Save button. But the Save button is not saving the record with the entered values on the input field.

My issue: if I use single form, the UI is not satisfied and If I am having the script code inside the form, the script code is not working. So Please make me understand and get resolved about the functionality of the save button works fine.
I hope someone will help me on this immediately


SandhyaSandhya (Salesforce Developers) 

Refer below link which has the sample code that shows how to pass value from one page to another.
Best Regards,
Rakshana Cube84Rakshana Cube84
Sandhya - Thanks for responding. My issue was one form has inputfield, another one has commandbutton to save the inputfield value. Just now I achieved that by using JQuery
jQuery('[id$=saveButton]').click(function(){ //Save button ID in the second form
    jQuery('[id$=thisform]').submit(); //Old form id
Rakshana Cube84Rakshana Cube84
<apex:form id="form1"> - - - Some input fields are here - </apex:form>
<apex:form id="form2">
<apex:commandButton title="Save & Continue" value="Save & Continue" action=" {!saveApplication}" />