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
Andrea John 6Andrea John 6 

How do I add another criteria to an onclick block?

Good Morning,

How do I add another criteria to an onclick block?

I am trying to make another field mandatory on our application but I don't know how to add an "and" to have the system look at both whether they checked the checkbox AND they entered a signature. 

Here is the code that shows both the checkbox and the signature textbox but the only validation that works is for the checkbox. How do I add a validation to look at both the checkbox and the signature textbox?

 <apex:outputPanel > <label style="font-weight:bold;font-size:8pt;"><apex:inputCheckBox styleClass="submitApp" value="{!application.Submit_Application_Section__c}"/>I certify that the information supplied by me on this application is true and correct to the best of my knowledge.</label><br/><br/> <label style="font-weight:bold;font-size:8pt;"><apex:inputText styleClass="submitSig" value="{!application.Signature__c}"/>My signature in this box certifies my submission of the application and non-refundable application fee.</label><br/><br/> <apex:outputText style="font-weight:bold;font-size:8pt;" value="All information is transmitted through secure servers." /><br/><br/> <apex:outputText style="font-weight:bold;font-size:8pt;" value="Berkeley College does not discriminate on basis of gender or sexual orientation, race, color, creed, religion, national origin, age, genetic characteristics, ancestry, disability, veteran or marital status, or civil union." /><br/><br/> <apex:outputText style="font-size:9px;" value="Berkeley College reserves the right to add, discontinue, or modify its programs and policies at any time. Modifications subsequent to the original publication of this information may not be reflected here. For the most up-to-date information, please visit BerkeleyCollege.edu. For more information about Berkeley College graduation rates, the median debt of students who completed programs, and other important disclosures, please visit BerkeleyCollege.edu/disclosures." /> </apex:outputPanel><br/>

 <p></p> <apex:commandButton title="Submit Application" value="Submit Application" action="{!submitApplication}" onClick="return validateCheckBox();" styleClass="saveButton" rendered="{!application.Date_Application_Submitted__c == null}" style="color:#000000; background-color:#DCDCDC;"/> </apex:form> </apex:pageBlockSection> </apex:pageBlock>

Thanks,
Andrea