validateForm Method |
Check that all required form fields are completed in the loaded document.
function validateForm(showMessages);
showMessages
Type: Boolean A value indicating whether a message should be shown if validation fails (e.g. all required form fields are not completed).Type: Boolean
Returns true if validation was successful (e.g. all required form fields are completed). Returns false if validation failed (e.g. all required form fields not are completed).This method will show a warning (e.g. "One or more required fields were not filled out.\n\nRequired fields are highlighted in red.") and return false if all required form fields are not completed and showMessages is true; otherwise the method will simply return false.
var myApi = new PdfWebControlApi("PdfWebControl1"); // where "PdfWebControl1" is the ID (ClientID) assigned to the PdfWebControl instance //if form is completed if(myApi.validateForm(true)) { //do complete page postback __doPostback("PdfWebControl1", ""); }