Qdabra's Header-Footer Template Part - Mel Balsamo
in

InfoPath Dev

This Blog

Syndication

Mel Balsamo

Qdabra's Header-Footer Template Part

When creating InfoPath solutions, one of the most important aspects is the visual design. This includes making sure that the layout, fonts, colors, white spaces, and most especially, the branding, are all uniform. We can always decide how our forms look like, but for a company to have its unique identity in its InfoPath forms, it should maintain proper branding by using its own company logo.

Company logos can either be placed in the InfoPath form’s header or footer, or both. Qdabra created a template part that has header and footer sections built-in. We can just change the logo, form title, company details, etc. and start using them in our forms.

Here’s how the Header-Footer XTP looks:

 

This blog post details the steps needed to modify the Header-Footer XTP and begin using it in your InfoPath forms.

REQUIREMENTS

  • Header-Footer XTP – Download it FREE here and save it your local machine.
  • InfoPath 2007 – template parts (XTPs) are not supported in InfoPath 2003.

MODIFY THE TEMPLATE PART

1. Launch InfoPath.

2. In the Getting Started dialog, under the ‘Design a form section’, click Design a Form Template…

 

3. In the ‘Open a form template’ section, click On My Computer…

 

4. In the ‘Open in Design Mode’ dialog box, select InfoPath Template Parts (*.xtp) from the file types dropdown.

 

5. Browse to the location where you saved the Header-Footer XTP and open it.

6. The template part will open in InfoPath Design mode.

 

7. Make all the necessary changes:

a. Header: replace the company logo with your own.

b. Footer: replace the small logo/icon as well as the company details.

Note: The Document ID in the footer is applicable only if you have Qdabra DBXL installed. You can delete this whole row if you do not intend to use the form with DBXL.

8. Save and close the template part.

ADD THE TEMPLATE PART IN INFOPATH CUSTOM CONTROLS

1. Launch InfoPath and select Design a Form Template based on a new blank one.

2. In the Controls taskpane, click Add or Remove Custom Controls…

 

3. In the Custom Controls dialog box, click Add > Template Part, and browse to the location where you saved your HeaderFooter XTP.

 

4. Verify that the XTP has been added to your Custom Controls taskpane.

 

ADD THE TEMPLATE PART TO YOUR INFOPATH FORM

1. In your blank InfoPath form template, click or drag the the HeaderFooter XTP from the Custom Controls taskpane. This will add the XTP onto your view.

2. Highlight or select the entire contents of the HeaderFooter XTP section.

 

3. Drag the selection outside the section.

 

4. Delete the empty HeaderFooterXTP section, leaving only the its dragged contents in the view.

 

5. Delete the HeaderFooterXTP node from the main data source.

 

6. Modify the two expression boxes in for the Document ID found in the footer.

Note: You may skip these steps and proceed to Step 7 if you do not intend to use the form with Qdabra DBXL.

a. Change the conditional formatting for the expression box labeled New.

i. Right-click on the expression box and select Conditional Formatting

 

ii. In the ‘Conditional Formatting’ window, click Modify.

iii. Delete my:HeaderFooterXTP in the formula.

 

iv. Click OK twice to close the dialogs.

b. Change the formula for the Document ID expression box.

i. Right-click on the expression box and select Expression Box Properties…

 

i. In the ‘Expression Box Properties’ window, under the ‘General’ tab, click on the fx button.

ii. Check ‘Edit XPath’ in the Formula dialog and delete my:HeaderFooterXTP

 

iii. Click OK twice to close the dialog boxes.

iv. Repeat all the steps in 6a above but this time, changing the conditional formatting for the blank Document ID expression box.

7. Change the formula for the Form Version expression box in the footer.

a. Right-click on the expression box and select Expression Box Properties…

b. In the ‘Expression Box Properties’ window, under the ‘General’ tab, click on the fx button.

c. Check ‘Edit XPath’ in the Formula dialog and delete my:HeaderFooterXTP

 

d. Click OK twice to close the dialog boxes.

That’s it! You can now design your form to suit your company needs. By having all your forms designed this way, ensure that you are maintaining uniformity and proper branding in your InfoPath solutions.

Comments

No Comments
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.