Users not made to enter required fields before being able to save

C

cwrightAGL

I have several fields with 'Cannot be blank' selected in the properties. I am
using Visual Studio, InfoPath SP1 and have a published fully trusted
template. I have a Save button using XDocument.SaveAs that saves the XML file
where I tell it to. How can I force the users to have to complete all
required fields before being able to save?
 
C

cwrightAGL

Buttons do not seem to have rules for required fields like text fields. I
didn't see it as an available action under Properties/Rule/Add Action. Am I
missing anything?

I wrote some VB.NET code. It is working well. Here is my code:
If thisXDocument.DOM.selectSingleNode("/my:myFields/my:location_code").text
= "" Or thisXDocument.DOM.selectSingleNode("/my:myFields/my:address").text =
"" Or thisXDocument.DOM.selectSingleNode("/my:myFields/my:tkn_by").text = ""
Or thisXDocument.DOM.selectSingleNode("/my:myFields/my:assigned_to").text =
"" Or thisXDocument.DOM.selectSingleNode("/my:myFields/my:date_taken").text
= "" Then thisXDocument.UI.Alert("Please fill out all required fields in
blue.") End If

Thanks.

Catherine
Catherine.
 
Top