InfoPath Radio Button Bold Selection
This is just a quick little fun one. In this post, I’ll show you how to make your radio button text show as bold when that radio button is selected, like this. See, the “Approved” word is bold when selected. This can be done in any version of InfoPath, but these instructions are specific to InfoPath 2010 and 2013.
- Add your radio buttons to InfoPath, without text next to them, just one under the other.
- Look at the properties of each radio button. For my first radio button, I’m using the text “Approved” when it’s selected, and for the second one, it’s going to have the text “Rejected”.
- On your form, put your cursor next to the first radio button, go to the Home tab and insert a new control, the “Calculated Value” control. In the dialog box that pops up, type the word “Approved” in quotes, and click OK.
- Put your cursor next to the second radio button, and insert another calculated field, and type the word “Rejected”, click OK.
- Here’s a trick so that the boxes will fit better wherever you put them, and will only take up as much space as the content inside them. Open the properties of the “Approved” calc control. (ALT+ENTER) Go to the Size tab, and in the Width box, type Auto, and choose px. Click OK. Do that for each calc control.
- Now, single click to select the “Approved” calculated box. On the Home tab of the ribbon, click Manage Rules.
- In the rules pane on the right, click the New button, and choose Formatting.
- Click the blue word None, under Condition. The name of the field behind my radio buttons is called SupervisorApproval. So my condition is SupervisorApproval is equal to (type text ) Approved. This is case sensitive, so look at my screenshot at step 2. The word is capitalized. Click OK.
- Still in the rule pane, in the formatting section below the condition, click the B for bold.
- Click to select the calculated field with the word rejected in it. Create the same rule, except the condition is going to be that SupervisorApproval is equal to Rejected.
Done. Preview your form, and click back and forth between Approved and Rejected, or whatever your options are, and see that the bold switches back and forth. Pretty cool!
Technorati Tags: SharePoint,InfoPath
Just added this to a new form I’m creating. Works on other controls too since the magic happens on the calculated field not the radio option.
This is the thing I like to read about as it makes such a difference to the visual appeal of forms.
IMHO users don’t care actually what the form does, more how it looks.
I agree, and they sure do love picture buttons!
My Option buttons refuse to behave. I am trying to size them to 25 px by 25 px but they keep setting themselves to width 100%. I can only set their width to auto or percentage, not pixels. I have done this before without incident but they now refuse to play.
Any ideas why or how to resolve?
Sorry Guy, but I’ve never seen radio buttons act like that. Try deleting and recreating?