Repeating Section with Attachment Control - Never Truly Mandatory? - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Repeating Section with Attachment Control - Never Truly Mandatory?

Last post 03-16-2011 07:49 AM by vergamim. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 03-15-2011 10:27 AM

    Repeating Section with Attachment Control - Never Truly Mandatory?

    Hi folks,

    I am developing an InfoPath 2010 filler form whose administrators require that at least one attachment be included. The user must also be able to add additional attachments if needed.

    To achieve this, I've created a repeating section with an attachment control set to "cannot be blank." The form cannot be submitted without an attachment present.

    However in testing we realized that the section can easily be removed entirely and can be submitted without any attachment (removing the repeating section also removes the "cannot be blank" requirement). More research revealed modifying the "section commands" in the properties of the repeating section allows one to disable the ability to "Remove" or "Remove All."  This is great & prevents the user from removing the repeating section at all.

    Next though we realized that this repeating section can be "cut" from the section's context menu which also allows the form to be submitted without an attachment.

    This MSDN article seems to suggest you can add validation as a rule on the attachment control if the attachment field is blank, but it doesn't seem to work 100%. The validation kicks in only when the attachment itself is removed or cut, not when the repeating section is removed (or cut). There doesn't seem to be any way to make the repeating section mandatory or unable to be "cut."

    Is there some way to make an attachment in a repeating section be truly mandatory without adding code?

    thanks!

     

  • 03-16-2011 06:16 AM In reply to

    Re: Repeating Section with Attachment Control - Never Truly Mandatory?

     Interesting. How about adding conditional formatting to the submit button, such that it is disabled if there is no attachment?

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 03-16-2011 07:49 AM In reply to

    Re: Repeating Section with Attachment Control - Never Truly Mandatory?

    Ingenious! Disabling the button when the repeating section is not present seems like it will work just fine in this case.

    Thank you ErnestoM!

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