IT tutorials
 
Technology
 

InfoPath with SharePoint 2010 : Enhancing the User Experience - Use Pictures as Choices

9/29/2013 7:44:01 PM
- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
Scenario/Problem:You want to provide pictures as a choice mechanism on your form.

Solution:Use picture buttons within multiple sections to set the values and show the appropriate selections.

Using picture buttons as options is a great way to jazz up your form and provide a great user experience. This can be implemented using a picture button for each option within small sections that are configured to display based on the selected option.

To set this up, follow these steps:

1.
First, add the field that will be the option and store the selected value. For example purposes, I am adding a PhoneType field with a default value of Home, as shown in Figure 1.

Figure 1. Adding a field allows you to store the selected value.


2.
The next step is to create image files for each option along with a selected version of the image (similar to the tabbed navigation scenario). For this example, I will use a home and a cell phone image.

3.
For each option, create a new section in your form to house the picture buttons as shown in Figure 2. In my example, I created a sectionHomePhone and a sectionCellPhone.

Figure 2. Creating new sections for each option provides the housing of the picture buttons.

4.
Create picture buttons inside each section using the selected version of the image for the corresponding section as shown in Figure 3. This provides the selected appearance. In my example, the selected home image is in the sectionHomePhone section and the selected cell phone image is in the sectionCellPhone section.

Figure 3. Placing the selected images within the corresponding section provides the selected appearance.

Tip

You can use the Hover Picture settings here, too!


Now you need to set the actions of the picture buttons by adding the appropriate rules:

1.
In the first section, select a non-elected picture button. For my example, I selected the cell phone image.

2.
Add a rule to the button with the Set a Field’s Value action and set the field for your choice to the appropriate value, as shown in Figure 4. This is the value that will be set when the picture button is clicked. For my example, I am setting the PhoneType to Cell.

Figure 4. Setting the field’s value changes the value when the button is clicked.


3.
Repeat steps 1-2 for any other nonselected picture buttons in the first section.

4.
Repeat steps 1-3 for each additional section. In my sectionCellPhone section, I selected the home button and added the appropriate rule to set the PhoneType to Home.

The final set of steps involve creating formatting rules on each section as follows:

1.
Select the first section and add a new formatting rule.

2.
Add a condition for the rule such that the field is not equal to the value that the section represents, as shown in Figure 5, because we are going to hide the section. In my example, for sectionHomePhone, the condition is the PhoneType is not equal to Home.

Figure 5. Setting the condition hides the section when the field is not equal to the value.

3.
Check the Hide This Control option in the rule under the Formatting section.

4.
Repeat steps 1-3 for each additional section.

Preview the form the test the implementation. Clicking a nonselected picture changes that button to the selected option, as shown in Figure 6.

Figure 6. Clicking a nonselected picture changes that button to the selected option.

Tip

Use a read-only text box to change the label of any dependent fields based on the selected option. In Figure 6, notice that the phone label now states Cell Phone.

 
Others
 
- InfoPath with SharePoint 2010 : Enhancing the User Experience - Create a Tabbed Navigation in Your Form
- InfoPath with SharePoint 2010 : Enhancing the User Experience - Make Screen Tips Informative for Validation, Notify the User of Successful Submission
- InfoPath with SharePoint 2010 : Enhancing the User Experience - Configure Dynamic Sections
- InfoPath with SharePoint 2010 : Enhancing the User Experience - Display a Read-Only Value
- Windows 7 : Using a Windows Network - Sharing Resources (part 2) - Sharing Folders Independently
- Windows 7 : Using a Windows Network - Sharing Resources (part 1) - Sharing with a Homegroup
- Windows 7 : Using a Windows Network - Network Power User Topics (part 2) - Mapping Drive Letters
- Windows 7 : Using a Windows Network - Network Power User Topics (part 1) - Understanding the UNC Naming Convention
- Windows 7 : Using Printers on the Network
- Sharepoint 2013 : Automating tasks with workflows - Starting workflows on documents, Checking the status of a running workflow
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
Technology FAQ
- Is possible to just to use a wireless router to extend wireless access to wireless access points?
- Ruby - Insert Struct to MySql
- how to find my Symantec pcAnywhere serial number
- About direct X / Open GL issue
- How to determine eclipse version?
- What SAN cert Exchange 2010 for UM, OA?
- How do I populate a SQL Express table from Excel file?
- code for express check out with Paypal.
- Problem with Templated User Control
- ShellExecute SW_HIDE
programming4us programming4us