Video: Adding form controls for repeating data

After the end of the last movie I went back and added the other nodes that we hadn't included to my schema. You can do that anytime you wish. Simply go back and open the Word Content Control toolkit, pull your template back in and make any adjustments you want to make. So it's easy enough to work with that. Make any adjustments you want to make. So now I have my Letter of Agreement that has the improved and attached schema here, and I'm going to show you how to copy the controls that we would like to have repeat. So, for example, we have a Choose a date control, now if you want to see these remember, you can go into Design mode, and then you can easily see the tags.

In this course, author Gini Courter introduces the form creation tools found in Word 2007 and shows how to produce electronic forms that are visually pleasing and easy to navigate. The course covers designing a form; capturing data effectively with dropdown lists, date pickers, and text boxes; and adding controls for repeating data using the Word Content Control Toolkit. The course also includes tutorials on testing, protecting, and distributing forms.

Adding form controls for repeating data

After the end of the last movie I went back and added the other nodes that wehadn't included to my schema.You can do that anytime you wish.Simply go back and open the Word Content Control toolkit, pull your templateback in and make any adjustments you want to make.So it's easy enough to work with that.Make any adjustments you want to make.So now I have my Letter of Agreement that has the improved and attachedschema here, and I'm going to show you how to copy the controls that we wouldlike to have repeat.So, for example, we have a Choose a date control, now if you want to see theseremember, you can go into Design mode, and then you can easily see the tags.

So that's a great way to do it.I told you that we'd lose our placeholders and that the new default text wouldcome out of our XML schema and here it is.So I'm going to choose company short name.This is a two click process once on the tag, once on the title.And I'm going to copy this either Ctrl + C or go to the Home tab and chooseCopy, and then I'm going to double-click and paste everywhere that shortname is going to go.I'd actually like to not include the space, but that's okay because a new spacewill be provided for me.

Notice that by default, the default paste behavior is to Keep Content Controlshere, along with the formatting out of this document, the Source Formatting.You could, if you were copying to another document, match thedestination formatting.But if you did that schema would already need to be attached for it to do you any good.Let's go ahead and continue to paste our shortname in here, many more times.This one's a little tricky because it's a possessive, so it's shortnameapostrophe s. I'm just going to backup here by holding Shift and using the arrowkey before I paste it in here again with Ctrl+V. And notice with thesehighlighted how quickly I can move through this document, putting all theseduplicate fields in here.

Now here's the test.Let's go back to the Developer tab and turn off Design mode.What we really want to know is if I select and enter a new shortname, forexample, Two Trees Oil, and tab out of this field and look at this.Here, here, here, here, all these locations, all of them changed.I'm going to go ahead and do service type as well, so you can see how this works.I'm going to say, Choose a service, click on the tag.

It helps for me to be in Design mode so I can see clearly what I'm doing.I'm going to copy this and paste it into service type here, double-click, and here.Notice again how nice it is to have tags with no spaces in them so thatdouble-click works for us.Let's exit Design mode and when I choose a service here, like business analysis,notice here and here it's changed as well.So simply by mapping the schema, binding the schema to those initial controls,and then using those bound controls to copy through this document, I have a setof controls that work together.

I don't have to go back to the first one to change the value.If I choose this one and change it from Business Analysis to Technical Writing,all of them will change; they are peers.Even though they were all copied from this first one, I don't have to changethis one to make the change.If I choose my Choose start date field and copy it, I can put it here, andfinally I think the last choice I have is Company Legal Name which I can copyfrom here, oh one more service type I missed, down to here.

I'll trust you to go ahead and clean the rest of these up if there are any more left to do.Now you'll notice that you can still click anywhere in the document;this document isn't quite done.We have one more thing to do before it would be completely finished and we wouldprotect the document to restrict formatting and editing and only allow Fillingin of forms, choose Start Enforcing Protection and say OK.We'll be in a great position now because I can tab from control to control, nowthat I've turned the protection on, it's really easy for my users to tab throughand see what they're doing.

Notice that the date changed.When I change one, both of them change; it works great.This is a fabulous form.No matter how long this form gets, it's going to behave just like this.So I can go in, enter my information really early on in the form and make surethat it flows all the way through.A couple of other tips I want to just toss your way before we finish thisfabulous repeating controls form.Sometimes when people are typing in this default text over in the schema, theywill put it all in caps so that it stands out from the other text that was here.

You can see how that would work for you.You know, if what we had here rather than enter short name, was it said ENTER SHORT NAME.Even if I'm not tabbing from field to field, those tend to jump out at me pretty nicely.And you'll notice that the control worked, because they all now say ENTER SHORT NAME.So a lot of steps to go through and creating the schema field is a littlestrange the first time, but by and large this is a great way to create anincredibly powerful form that you would otherwise have to copy and pastetext into repeatedly.

You can combine these two techniques that we've seen in the last chapter,the building block techniques with the dropdown list, with the repeatingcontrols that we have here.So you can have someone choose from a dropdown list and have the contents ofthat content control that was pulled out of the Quick Parts library repeatelsewhere in the document.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.

Already a member ?

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships.
Learn more

Upgrade to our Annual Premium Membership today and get even more value from your lynda.com subscription:

“In a way, I feel like you are rooting for me. Like you are really invested in my experience, and want me to get as much out of these courses as possible this is the best place to start on your journey to learning new material.”— Nadine H.

Thanks for signing up.

We’ll send you a confirmation email shortly.

Sign up and receive emails about lynda.com and our online training library:

new course releases

newsletter

general communications

special notices

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

new course releases

newsletter

general communications

special notices

Here’s our privacy policy with more details about how we handle your information.