Infopath form practice

Source: Internet
Author: User
This example designs a form of employee information, including name, gender, birth date, ID card number, department, mobile phone number, and email. Three verification rules are added. The ID card must comply with the required digits and rules, the mobile phone number must be 11 digits, and the emai must comply with the email address rules.
Step 1: Enable infopath 2007
Method: Click Start> All Applications Program -> Microsoft Office infopath 2007.
Click Design form template Select a blank form template and click OK.

Step 2: Create the infopath layout.On the design task panel on the right, click layout.
In the insert layout table on the layout panel, click a table with a title and a custom table, and select 7 rows and 2 columns from the custom table.


After you click OK, the table format is determined.
Step 3: add information and controls to the table.Now, change the title to basic employee information. Enter the name, gender, date of birth, ID card number, department, mobile phone number, and email on the left side of the table below. ClickDesign taskOfWidget, InName, ID number, mobile phone number, emailDrag backText Box,InGender and DepartmentDrag backDrop-down list box,InDate of birthDrag backDate selector.For example:

Step 4: bind the domain name to the added control.
Double-click the "name" text box and set the bound domain name to "name". The data type is text. For example:

Use the same method to bind the domain name "Birthday", "I. d. Card", "mobilephone", and "email" to the birth date, ID number, mobile phone, and email respectively ". (Note: select a date as the Data Type of the birth date and an integer as the Data Type of the mobile phone number .)
Double-click the "gender" drop-down list box to bind a domain name called "sex". In the list box, click the Add button, enter "male" in the Add option, and click the Add button again, enter "female" in the Add option, as shown in.

Bind the domain name "department" to the "department" drop-down list in the same way, and add "Technology Department", "Commerce Department", and "Finance Department" to the list ".
Step 4: Add verification for your ID card, mobile phone number, and email.
Double-click the document box of the ID card number, click data verification-> Add-> select a unmatched mode in the equal to drop-down box, and select "select mode" in the drop-down box ", then, select the custom mode in the pop-up data item mode dialog box, and enter \ D {17} [\ d | x] | \ D {15} in the Custom mode }, enter "Incorrect ID card number" after the on-screen prompt and message, and check the box to display the message immediately when invalid data is entered. Specific operations are as follows:

Use the same method to add the corresponding regular expression to the mobile phone and email, and prompt the message when an error occurs. The Regular Expression of the mobile phone is \ D, email, for example, the data item mode already has the verification mode, but when you select "email address", it will be OK. The error message is "Incorrect mobile phone number" and "Incorrect email address format ".
Step 5: Set infopath to the domain security level. Click Change compatibility settings, select "security and trust", and set it to "field (the content of the field where the form can be accessed)" in the right form )". Click OK to return to the design form. For example:

Step 6: publish a form template. Click Publish form template and enter the employee basic information. xsn in the file name, as shown in.

Click Save to go to the step of releasing the infopath form, and select "Sharepoint Server with or without infopath Forms Services ".

Click "Next" and enter http: // localhost: 60000/form services test in the URL of the target website. If your Moss site is a domain user, enter the user name and password.

Click Next. On the displayed page, select "enable users to enter this form in a browser", and select the document library as the content to be created ", in this case, the form will be published as a template for the document library. You can open and fill in the Form to save the data back to the document library. For example:

Click next:

Click Next. Enter basic employee information in the name and description.

Click Next: click Add to add the previous column name. For example:

Click next:

Click Publish

OK. Now the form has been developed and released. By the way, find the basic information about the employees on the website, choose Settings> form database settings, and click Advanced Settings to set the documents with the browser enabled to display as webpages.


Now let's go to the website to check the effect:

Click new> Create document. On the displayed form page, enter the relevant information.



It can be seen that verification can be performed when illegal data is input. Enter the correct information and save it. The information is displayed in the list.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.