Conditional Required Field - InfoPath Dev
in

InfoPath Dev

Conditional Required Field

Last post 07-18-2006 09:18 AM by BrenDren. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 07-17-2006 10:38 AM

    Conditional Required Field

    Is it possible to create a field that would only be required when a certain selection is made from a drop down box? For example, the field "jobtitle" has 3 options: attorney, paralegal, or support staff. If attorney is chosen, then a field called BarRegistration would be required, but if paralegal or support staff is chosen, that information would not be needed. I could just hide the field when the other choices are made, but we want to make sure that if they choose attorney, they put the attorney's bar # in this field, so would like to make it a required field.
  • 07-17-2006 10:48 AM In reply to

    Re: Conditional Required Field

    Hello
    Welcome to Infopathdev Forums

    Yes you can select the check box "cannot be blank" in the Text box(Bar Registration)Properties. Double Click on the fields to open properties.
    Use Conditional Formatting to Show/Hide the Field based on the selection made in the Drop down list.
    Kalyan G Reddy
    Infopath MVP 2007 and 2008
  • 07-17-2006 11:10 PM In reply to

    Re: Conditional Required Field

    @drgkreddy

    I think this won't work. As far as I know the problems is that no matter if the field is visible or not it will always be set to mandatroy. So if he wants to submit the form and has not filled the invisible textbox which cannot be blank he'll receive a warning message.

    @BrenDren

    I would suggest to use Data Validation. Double click the textbox which only appears when you select attorney. Chose Data Validation. Then in the if statment select your dropdown list from which you can select the attorney value. As condition select "is equal to" and in the last ddl write "attoreny"

    Hope this helps.

    Please correct me if I was wrong.
    Listen to Motörhead cos they play Rock'n Roll :)
  • 07-18-2006 12:41 AM In reply to

    Re: Conditional Required Field

    Hello nukkumatti,

    Yes I agree you are right and also you need to add(and)another condition in the data validation.
    select your dropdown list from which you can select the attorney value. As condition select "is blank". You need to put 2 conditions

    I hope this will help you.
    Kalyan G Reddy
    Infopath MVP 2007 and 2008
  • 07-18-2006 09:18 AM In reply to

    Re: Conditional Required Field

    I was originally going to say that drgkreddy's first solution had worked, but what actually happened was that when I put in the conditional formatting, it removed the "cannot be blank" requirement.

    However, the combination of the two data validations suggestions is working perfectly. Thank you so much - this will really open up several possibilities for us!
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.