Disable "cannot be blank" condition when control is hidden

Leili vazietan 111 Reputation points
2021-03-07T12:43:54.553+00:00

I have a date picker control inside a section control. The section control is hidden when another drop down list control selection equals a certain value. I have "cannot be blank" checked on the date picker control

The problem arises when the section control is hidden (and not needed). The form won't submit because the date picker control is blank which it will be when it's hidden and thus not required.

pls hel me to can put the option "can not be blank"for condition when control is hidden

Microsoft 365 and Office | SharePoint Server | For business
0 comments No comments
{count} votes

Accepted answer
  1. Allen Xu_MSFT 13,866 Reputation points
    2021-03-08T08:25:07.35+00:00

    Hi @Leili vazietan ,

    To configure conditonally required fields in InfoPath, please take a reference to the following steps to modify your existing InfoPath form.

    • Disable "Cannot be blank" option in Data Picker Properties.
    • Click on Date Picker control and select Manage Rules. New a validation rule then.
      75296-1.png
    • Click "None" under Condition section and add rules:
      (Drop-Down List control) (is not equal to) (the certain value) and (Date Picker control) (is blank)
      75332-image.png
    • Type in Required in ScreenTip textbox.
      75209-image.png
    • Republish the InfoPath form.

    Test result in my end:
    75353-infopathtest.gif


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


1 additional answer

Sort by: Most helpful
  1. Leili vazietan 111 Reputation points
    2021-03-08T19:10:28.367+00:00

    hi AllenXu-MSFT

    thanks a lot

    it was great

    My problem was solved with this solution

    thanks

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.