Change a text box to be required based on option button - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Change a text box to be required based on option button

Last post 05-22-2009 02:20 AM by Samir Farid. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 04-30-2009 04:03 AM

    Change a text box to be required based on option button

    Hi all,

    I'm very new to InfoPath and am trying to get the following working. I want two text boxes to become required fields based on the option button a user chooses which is also a required option.

    Is this possible?

    Thanks,

    Dan 

  • 04-30-2009 04:56 AM In reply to

    Re: Change a text box to be required based on option button

    Hi

    Welcome to Infopath Forums!!

    Follow below steps:

    1.Open infopath in design mode
    2.Right click on the text box
    3.Select Text Box Properties
    Result:Text Box Properties window will open
    4.Click on Data Validation button
    5.Click on Add button
    6.Select the Radio button control name in the first dropdown
    7.then Select 'Type a nUmber' in the third drop down
    8.Enter '1' number
    9.Second dropdown value will 'is equal to'
    10.Enter the text in either ScreenTip or Message  text box
    11.Click Ok
    12.Click ok
    13.Click ok
    14.Repeat the same steps for Second text box control.
    15.Save the form and preview it.

    Result:When the radio button is selected first and second text boxes will become required fields

     

    Madhuri
    http://www.ggktech.com
  • 04-30-2009 06:26 AM In reply to

    Re: Change a text box to be required based on option button

    Hi,

    Thanks for this however it does not seem to change the functionality of the text box to be a required field with a red star like other text boxes I have.

    Any further thoughts?

    Thanks again,

    Dan

  • 04-30-2009 06:33 AM In reply to

    Re: Change a text box to be required based on option button

    Hi

    1.Go to properties window of radio button

    2.Change the value for 'Value when selected' to '1'

     

    Madhuri
    http://www.ggktech.com
  • 04-30-2009 07:05 AM In reply to

    Re: Change a text box to be required based on option button

     Awesome thanks for the help, very much appreciated :)

  • 04-30-2009 07:12 AM In reply to

    Re: Change a text box to be required based on option button

    Spoke to soon!

    I get the red stars etc :) but now when clicking the submit button I get a validation error. Specifically a red dashed border around the text box even if text has been entered.

    Thanks,


    Dan

  • 05-02-2009 03:54 AM In reply to

    Re: Change a text box to be required based on option button

    Hi,

    May be the data type of the text box and the data you have entered were mismatched.

    Can you check it once?

    Rajitha
  • 05-22-2009 02:20 AM In reply to

    Re: Change a text box to be required based on option button

    I came across the same problem as Weemandan, but I was able to fix it by changing the Data Validation of the textboxes:

    From: RadioButton =1
    To: RadioButton = 1 And Textbox is blank.

    What we basically say is that we only get a validation error if the radiobutton is not selected and the textbox is empty.

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