0

In Infopath form i have two buttons, when one button is clicked only some fields are to be shown others should be invisible, when another button is clicked other fields only be visible. I get it only some conditional values are set using formatting condition.

How come i get it when buttons are clicked

2

Place all the controls in a section and apply rules on the button click. You can show and hide the default fields and based on button click show and hide the relevant section.

Hide and show sections

Hide sections in InfoPath forms

1

I know this is an old thread, but it was one of the only search results, so I'm going to put in how to do it.

Make a picture button, text box and section.

Section Rules: text box doesn't equal 2, formatting, hide this control

Picture Button Rules:

  1. text box is blank OR text box = 3, Action, Set field's value: text box = 2
  2. text box = 2, Action, Set field's value: text box = 3

The text box does not need to be present on the form.

What this does is it creates a loop and allows for multiple clicking. So when you click on the button the text box says 2 and section will show. When you click again the text box will say 3 and the section will hide.

After applying rule 1., you need to check the box "Don't run remaining rules...". If you don't check this box, it will not loop.

  • It worked for me.Thank you so much for posting this Brittany – Sai Jun 11 at 17:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.