Adding support for mandatory fields - InfoPath Dev
in

InfoPath Dev

Adding support for mandatory fields

Last post 09-24-2009 06:29 PM by IanBuckland. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 07-28-2005 08:32 AM

    • danadam
    • Not Ranked
    • Joined on 07-28-2005
    • USA
    • Posts 6

    Adding support for mandatory fields

    I have some custom InfoPath forms and I need to make the reply to certain questions mandatory, in other words you can't SAVE the form without filling out several fields/questions (text boxes, Value List Box, etc).

    Is there an easy way to add this to my forms or form template?

    thanks

    Daniel Adam
    S/W Architect - Compliance SME
  • 07-28-2005 10:02 AM In reply to

    Re: Adding support for mandatory fields

    Hi Daniel Adam, Welcome to the Forum!
    You can do two things to make the user fill the mandatory fields.
    1. Open the schema, add an attribute called "nillable=false" to the field that you want to make Madatory
    2. Another option for you is, add a data validation on the field to make it compulsory.

    In addition to above two things you need to disable the button(which submits the data till all the required fields are filled. This can be done by adding conditional formatting to the button.

    Agni
    InfoPath Dev India
  • 07-28-2005 10:05 AM In reply to

    Re: Adding support for mandatory fields

    Simpler thing would be just to mark them as required in the data source. Double click on the field and change to required. If this is disabled, then you will have to extract the form files (from file menu) and manually update the xsd as Agni describes.

    Keep in mind that the default behavior of InfoPath is not to force you to fill out any fields. That's to support offline scenarios where partial save is needed.

    To truly block submits, you will have to add code that walks the error board and checks to see if any fields that were required are not filled in. You may also want to validate the content.

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
  • 07-28-2005 11:27 AM In reply to

    • danadam
    • Not Ranked
    • Joined on 07-28-2005
    • USA
    • Posts 6

    Re: Adding support for mandatory fields

    Thanks guys, this has been very helpful.


    Daniel Adam
    S/W Architect - Compliance SME
  • 10-27-2008 11:06 AM In reply to

    Re: Adding support for mandatory fields

    Agni, I'm using Data Validation in one text box to check if one check box selected then this text box will be mandatory. It's working but when the users fill the mandatory field and try to submit the form they can not and the cursor come back to the field. Any idea? Thanks in advance!
    Ibere Jones
  • 09-24-2009 06:29 PM In reply to

    Re: Adding support for mandatory fields

    Hey Patrick - do you have some script that you could post that would do this.

    Thanks

    Ian B

Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.