Hi Will,
We assume that your requirement is to check whether all required text fields are updated and notify the user to update if any required field is left empty.
To achieve this requirement, you can save the PDF and check whether any required text fields are empty using the PdfLoadedDocument. Please find the code snippet below. Please use this code with the desired form document and let us know whether your requirement is satisfied and let us know if you need any further assistance.
private void validateButton_Clicked(object sender, EventArgs e)
{
Stream saveStream = new MemoryStream();
pdfViewer.SaveDocument(saveStream);
PdfLoadedDocument pdfLoadedDocument = new PdfLoadedDocument(saveStream);
foreach(PdfLoadedField loadedField in pdfLoadedDocument.Form.Fields)
{
if(loadedField is PdfLoadedTextBoxField textBoxField)
{
if (textBoxField.Required && string.IsNullOrEmpty(textBoxField.Text))
{
DisplayAlert("Alert", "Please fill all the required fields", "OK");
return;
}
}
}
}
Regards,
Bharathi S