ข้ามไปที่เนื้อหาหลัก
การสนับสนุน
ลงชื่อเข้าใช้
ลงชื่อเข้าใช้ด้วย Microsoft
ลงชื่อเข้าใช้หรือสร้างบัญชี
สวัสดี
เลือกบัญชีอื่น
คุณมีหลายบัญชี
เลือกบัญชีที่คุณต้องการลงชื่อเข้าใช้

หมายเหตุ:  เราต้องการมอบเนื้อหาวิธีใช้ปัจจุบันในภาษาของคุณให้กับคุณโดยเร็วที่สุดเท่าที่เราจะทำได้ หน้านี้ได้รับการแปลด้วยระบบอัตโนมัติ และอาจมีข้อผิดพลาดทางไวยากรณ์หรือความไม่ถูกต้อง จุดประสงค์ของเราคือเพื่อให้เนื้อหานี้มีประโยชน์กับคุณ คุณแจ้งให้เราทราบว่าข้อมูลดังกล่าวมีประโยชน์ต่อคุณที่ด้านล่างของหน้านี้ได้หรือไม่ นี่คือ บทความภาษาอังกฤษ เพื่อให้ง่ายต่อการอ้างอิง

In Microsoft Office InfoPath, you can use conditional formatting to specify different formatting options for a control that is based on conditions that occur on the form. If the specified conditions are true when a user fills out a form that is based on your form template, the conditional formatting is applied.

Click Insert Formula รูปภาพปุ่มกด.

This article explains how to use conditional formatting to disable or set a control as read-only, based on the value of another control on your form template. For example, to ensure that a user reads a user agreement section before clicking a Submit button, you can use conditional formatting to disable the Submit button unless the user selects a check box indicating that he or she has read the user agreement. Alternatively, to make sure that a user doesn't change a previous response to a survey question, you can use conditional formatting to ensure that a text box is set to read-only after a user enters information into another control.

ในบทความนี้

ก่อนที่คุณจะเริ่มต้น

In order to complete this procedure, you must have at least two controls on your form template — one control that you want to disable or set as read-only and a second control whose value will determine the state of the first control.

Top of Page

Compatibility considerations

When you design a form template in InfoPath, you can choose a specific compatibility mode to design a browser-compatible form template. When a browser-compatible form template is published to a server running InfoPath Forms Services, and then browser-enabled, forms based on the form template can be viewed in a Web browser. When you design a browser-compatible form template, some controls are unavailable in the Controls task pane because they cannot be displayed in a Web browser.

List of controls that can be disabled or set to read-only by using conditional formatting

The following table lists the Office InfoPath 2007 controls that can be disabled or set to read-only by using conditional formatting and whether the controls are available for browser-compatible form templates.

ตัวควบคุม

ตัวเลือก

Available for browser-compatible form templates?

กล่องกาเครื่องหมาย

Disable

ใช่

Date picker

Read-only

ใช่

กล่องรายการแบบดรอปดาวน์

Disable

ใช่

กล่องรายการ

Disable

ใช่

ปุ่มตัวเลือก

Disable

ใช่

Rich text box

Read-only

ใช่

กล่องข้อความ

Read-only

ใช่

Bulleted, numbered, or plain list

Read-only

ไม่ใช่

กล่องคำสั่งผสม

Disable

ไม่ใช่

File attachment

Disable

ไม่ใช่

Ink picture

Disable

ไม่ใช่

Multiple-selection list box

Disable

ไม่ใช่

รูปภาพ

Disable

ไม่ใช่

Top of Page

Disable or set a control as read-only

  1. On the form template, click the control that you want to disable or set as read-only.

  2. On the Format menu, click Conditional Formatting.

  3. ในกล่องโต้ตอบ การจัดรูปแบบตามเงื่อนไข ให้คลิก เพิ่ม

  4. Under If this condition is true, set the condition that you want. For example, to apply conditional formatting to the control that you selected in step 1 when a certain value is entered into another control on the form template, select that second control in the first box, and then specify the value that will determine the conditional formatting for the control you selected in step 1.

  5. Under Then apply this formatting, do one of the following:

    • If the control can be disabled, click Disable this control.

    • If the control can be set to read-only, click Read-only.

  6. To save the condition and return to the form template, click OK twice.

  7. เมื่อต้องการทดสอบการเปลี่ยนแปลงของคุณ ให้คลิก แสดงตัวอย่าง บนแถบเครื่องมือ มาตรฐาน หรือกด CTRL+SHIFT+B

Top of Page

ต้องการความช่วยเหลือเพิ่มเติมหรือไม่

ต้องการตัวเลือกเพิ่มเติมหรือไม่

สํารวจสิทธิประโยชน์ของการสมัครใช้งาน เรียกดูหลักสูตรการฝึกอบรม เรียนรู้วิธีการรักษาความปลอดภัยอุปกรณ์ของคุณ และอื่นๆ

ชุมชนช่วยให้คุณถามและตอบคําถาม ให้คําติชม และรับฟังจากผู้เชี่ยวชาญที่มีความรู้มากมาย

ข้อมูลนี้เป็นประโยชน์หรือไม่

คุณพึงพอใจกับคุณภาพภาษาเพียงใด
สิ่งที่ส่งผลต่อประสบการณ์ใช้งานของคุณ
เมื่อกดส่ง คำติชมของคุณจะถูกใช้เพื่อปรับปรุงผลิตภัณฑ์และบริการของ Microsoft ผู้ดูแลระบบ IT ของคุณจะสามารถรวบรวมข้อมูลนี้ได้ นโยบายความเป็นส่วนตัว

ขอบคุณสำหรับคำติชมของคุณ!

×