T
tbad
I've seen the previous posts on this topic.
It seems that Infopath's logic is that, if an attribute is "Optional," and
you elect
to include it on your form, and it is a non xs:string, then its value is
REQUIRED.
Hence, the greyed out "cannot be blank" button.
So, if you're building a form from an XSD that has an element person
w/attributes name and age,
<person name="Will" age="21"></person>
Then, if you have the age on the form, it is required.
Going to TOOLS/FORMS OPTIONS/EDIT DEFAULTS and unchecking the box on
age will remove it from the form.
----------------
IS THERE any way to have the form behave so that if the bound textbox is
left blank,
the attribute is ommitted from the XML file? In this instance, the name is
ommitted,
so the expected file save would be:
<person name="Sarah" ></person>
It seems that Infopath's logic is that, if an attribute is "Optional," and
you elect
to include it on your form, and it is a non xs:string, then its value is
REQUIRED.
Hence, the greyed out "cannot be blank" button.
So, if you're building a form from an XSD that has an element person
w/attributes name and age,
<person name="Will" age="21"></person>
Then, if you have the age on the form, it is required.
Going to TOOLS/FORMS OPTIONS/EDIT DEFAULTS and unchecking the box on
age will remove it from the form.
----------------
IS THERE any way to have the form behave so that if the bound textbox is
left blank,
the attribute is ommitted from the XML file? In this instance, the name is
ommitted,
so the expected file save would be:
<person name="Sarah" ></person>