Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Panel
borderColorgreen
borderWidth1
titleBGColor#ddffcc
borderStylesolid
titleDefinition

Select Box เป็นหนึ่งในองค์ประกอบการป้อนแบบฟอร์ม HTML ทั่วไป ในการสร้างแบบฟอร์มหนึ่งสามารถกำหนดตัวเลือกที่มีให้กับกล่องเลือกด้วยวิธีการต่าง ๆ รวมถึงการใช้ตัวเลือกแบบ Form Options Binder.


ภาพที่ 1: ภาพตัวอย่างแสดงฟิล์ดซีเล็กบล็อกใน App CRM 

...

NameDescription
IDรหัส (เมื่อประกาศ ID ชื่อ "country" แล้ว จะมีการสร้างคอลัมน์ตารางในฐานข้อมูลว่า "c_country")
Labelชื่อที่จะแสดงให้ผู้ใช้เห็น.
Options (Hardcoded)

ตัวเลือกซีเล็กบล็อก

Info
ตัวเลือกที่กำหนดไว้ที่นี่จะไม่ถูกนำไปใช้หาก Options Binder ด้านล่างถูกกำหนด
Or Choose Options Binder

ตัวเลือกซีเล็กบล็อกโดยใช้ปลั๊กอินตัวเลือกแบบ Options Binder plugin.

Warning
titlePerformance Warning

หากคุณมีตัวเลือกหลายพันตัวเลือกตัวเลือกนี้อาจทำให้เวลาในการโหลดหน้าเว็บเพิ่มขึ้นอย่างมาก ควรพิจารณาใช้ ป๊อปอัพซีเล็กบล็อก (Popup Select Box) แทน

Figure ภาพที่ 3: Select Box Properties - Advanced Options คุณสมบัติซีเล็กบล็อกตัวเลือกขั้นสูง

NameDescription
Value

Default Value when there's no existing value found/selected.

ดีฟอลต์ค่าเริ่มต้นเมื่อไม่มีค่าใดๆ

คุณอาจใช้ตัวแปร Hash variable ตามตัวอย่างต่อไปนี้
Hash variable is accepted here. For example, you may key the following
Code Block
#currentUser.firstName# #currentUser.lastName#

to pre-populate the field with current logged in user's name.

เพื่อกำหนดชื่อผู้ใช้ที่ลงชื่อเข้าใช้อยู่ ลงในฟิลด์

คุณอาจกำหนดตัวเลือกเริ่มต้นหลายตัว คั้นโดยใช้เครื่องหมายอัฒภาคYou may define multiple default options by separating them using semicolons.

Code Block
titleSample
option1;option2;option3
Multiple Selection

Toggle Multiple Selection.เลือกได้หลายรายการ

Validator

Attach a Validator plugin to validate the input value.แนบปลั๊กอิน Validator เพื่อตรวจสอบความถูกต้องของค่าที่ป้อนเข้ามา

Info
titleWhen will validation takes place?

Validation will takes place whenever form is submitted except when it is submitted as การตรวจสอบจะเกิดขึ้นทุกครั้งที่มีการบันทึกแบบฟอร์มยกเว้นเมื่อบันทึกเป็น "Save as Draft".

Field ID to control available options based on Grouping

Dynamically change the available options based on the "grouping" attribute defined in the options by matching to the current value of the element ID defined.เปลี่ยนตัวเลือกที่มีอยู่แบบไดนามิกให้ตัวเลือกขึ้นตาม "การจัดกลุ่ม" ที่กำหนดไว้โดยจับคู่กับค่าข้อมูลของรหัสที่กำหนด

Size (Rows)

Determines the number of rows of selection to be shown.

This option is useful when multiple selection is expected. Integer value is expected here.

กำหนดจำนวนแถวที่จะแสดง

ตัวเลือกนี้มีประโยชน์เมื่อคาดว่าจะมีการเลือกหลายแบบ

Readonly

กำหนดว่าข้อความสามารถแก้ไขได้หรือไม่

Readonly

Determines if the element is editable.

Display field as Label when readonly?

Displays the value of the element as plain text when element is set to แสดงค่าของข้อความในรูปแบบข้อความล้วนๆไม่มีกล่องข้อความ เมื่อกล่องข้อความนั้นถูกตั้งค่าไว้ว่า "Readonly".

Workflow Variable

If the form is part of a workflow process, upon saving of the form (by clicking on ถ้าแบบฟอร์มเป็นส่วนหนึ่งของเวิร์กโฟลว์โพรเซส เมื่อบันทึกแบบฟอร์ม (โดยคลิกที่ปุ่ม "Save as Draft" or หรือ "Complete" button). The value in this input field will be saved into the corresponding workflow variable named here.) ค่าในฟิลด์อินพุตนี้จะถูกบันทึกลงในตัวแปรเวิร์กโฟลว์ที่ระบุไว้ที่นี่

Info
titleUsing a non-existent Workflow Variable name

You will get the following warning with the name printed out (e.g. status) in the server log if you attempt to map to a non-existent Workflow Variable.คุณจะได้รับคำเตือนต่อไปนี้โดยแสดงชื่อตัวแปรออกมา (เช่น status) ถ้าหากการบันทึกของเซิร์ฟเวอร์ไม่มีค่าที่พยายามแมปกับตัวแปรเวิร์กโฟลว์ได้

Code Block
context attribute status does not exist in process context - adding new attributes to the process context is not allowed