Join Gini von Courter for an in-depth discussion in this video Adding and formatting a layout table, part of InfoPath 2010 Essential Training.
I've chosen a page layout, and now it's time to create tables. Whatever I know about my data, it's a good thing to have that close at hand right now. For example, if I'm working from a manual form that's been in use, I'd like a copy of that form in front of me. If I'm working from a list of fields that I've gotten from others and then I've drawn a sketch on a napkin, I want get napkin in front of me, because I need to choose the basic structure of how my form is going to look, and that's all about the data.
On the Insert tab, we have an entire gallery of tables, as well as the ability to create a custom table. I'm going to click where it says 'Add tables' and then open this dropdown, and you'll find that we have single-column tables here which allow a field that goes from the left side of the form to the right. And the differences between these four thumbnails are that this has no heading above it, this has a subheading, this has a larger heading, and this has both a heading and a subheading.
So if I were going to have a series of tables and perhaps wanted to explain them at the top of the first one, I might choose this, and then for later tables include just a subheading. I then have some two-column and four-column tables. They don't all have the same number of controls per row, so let's take a look. And these two-column tables here, this set of four, the first column is taken up with labels and the second is taken up with my controls. So there are the four two-column tables that really, each row has one control element in it, and again, one with no heading, one with the subheading, one with the heading, and one with both headings and subheadings.
I can see exactly those same four choices repeated here on the right, two-column tables, but with a backfill, with an emphasis that's picked up out of the color set, the theme that we'll choose next. So I have the choice of four different sets of headings or no headings and the same thing with some backfill. I then have what's called a stacked display, and here, even though I have the same two columns, in this layout, the label appears above the control.
So the label todaysdate would be above the date picker, and because I'm not giving up the first column to Labels, I actually have the ability to put two controls in each row here. I see those same four choices and the four choices with emphasis. I then have some four-column choices, and none of them stack the controls. So basically the four-column choices will give me the same kind of layout as I get here, with my two columns, because what I have is a label and a control, a label and a control.
If I want something other than two columns, single column, or four columns, then I should choose Custom Table. What I'm going to choose this time is I'm going to choose this two-column table right here, with no heading. And notice what it looks like. It's very basic. My labels are formatted in italics, so I could enter, for example, Today's Date, and then I click here to add a control. Below this I would like the user to have a place to enter a fair amount of information, and I'd like to give them a little subheading first.
So I'm going to choose this Single Column stacked, and when I do, notice its Click To Add Subheading, and here I had my label and control. Below this I have an area where I would like the user to be able to enter a fair amount of information in a small area. So I'm going to choose one of these four-column layouts, and I'm going to choose one with an emphasis so you can see what it looks like. So we pick up a color out of the theme. It's actually quite bright. If I'd like a custom table for any of these, I can simply choose a table as I would in Word.
The only issue with a custom table is that I don't have the ability to put headings and subheadings on it easily, and it won't come with automatic Add Label, Add Control placeholders. So it might be that if I want a custom table and I would like it to have a heading, I might go in first and say, well, I'm going to go pick up a subheading here, just to get the subheading, delete the rows, select, right-click, Delete > Rows, so that I have this subheading out of my gallery, and then I could add a custom table.
So, for example, if I would like people to be able to add a lot of data here in a really small area, I could choose, for example, an 8x1 table or 8x2, and when I do that it will create a table for me-- but again, no placeholders in the table. The other things that you can do to a table here in InfoPath are very similar to the things that you can do when you're in Word. If you click in a table, you have the ability to insert rows above or below, insert columns to the left or the right of the current column.
You can turn gridlines on and off. You can delete rows or columns that are selected or the entire table that you're in. You can take two cells or more and select them and merge them and put them together for a longer entry. You can select any cell or group of cells and split it into two or more columns to be able to put very small controls-- for example, a two letter state abbreviation would go here. And you have the ability to modify borders and shading in your table.
I ask you not to do that yet, for reasons that will be apparent in the next movie. You can adjust the cell padding. So, for example, if you'd like to have this text a little closer to the center of the cell, you can select any cell and make these changes. Notice as soon as you select, the placeholders for Add label and Add control disappear, but they still work exactly the same way. Don't be afraid to use these Layout Table tools. You probably know how most of them work from other applications, but they're very easy to use here in Microsoft InfoPath.
If you make a mistake while you're formatting or laying out your table, simply go ahead and undo, Ctrl+Z or click the Undo button to undo your change.
- Creating a template from scratch
- Understanding and modifying data sources
- Formatting a template
- Inserting text controls, data pickers, and check boxes
- Catching incorrect or missing data
- Using tables and sections for repeating data
- Calculating a value with form data
- Checking spelling and testing a template
- Creating views
- Developing data connections to SharePoint lists and XML files
- Understanding publishing options for InfoPath templates
- Importing Excel and Word forms