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
Dan ErvinDan Ervin 

Will a commandButton save action work for all <apex:form> elements on a page?

I have a call script page that has one <apex:form> element wrapping the content. However, I need to add an <apex:relatedList> element which apparently cannot be used inside of <apex:form> tags. My initial thought is to use different <apex:form> tag sets in order to insert the relatedList in between their usage.

My question is this... if you have multiple <apex:form> elements on a single page... will a commandButton with a {!save} action save all of them if not form ID is listed? 
Dan ErvinDan Ervin
Oops, typo! The final question was:  If you have multiple <apex:form> elements on a single page... will a commandButton with a {!save} action save all of them if no form IDs are listed? 
David ZhuDavid Zhu
Unfortunately, from my expierence, only the fields in the same <form> section with the command button will be saved.
David ZhuDavid Zhu
But if using standard controller extension and override SAVE method, you should be able to save all fields in different <form> section.