Table of Contents |
---|
Usages
Thai |
---|
ตามธรรมเนียม |
Extend types of fields available in Form Builder.
Thai ขยายประเภทของเขตข้อมูลที่มีอยู่ในเครื่องมือสร้างแบบฟอร์ม
A useable Form Field Element plugin must extends org.joget.apps.form.model.Element abstract class and implements org.joget.apps.form.model.FormBuilderPaletteElement interface.
Thai ปลั๊กอินองค์ประกอบของเขตข้อมูลฟอร์มที่ใช้งานได้จะต้องขยายคลาสนามธรรม org.joget.apps.form.model.Element และดำเนินการ org.joget.apps.form.model.FormBuilderPaletteElement
Abstract Class
Thai |
---|
ชั้นนามธรรม |
org.joget.apps.form.model.Element
Under wflow-core module
Thai ภายใต้โมดูล wflow-core
Extended org.joget.plugin.base.ExtDefaultPlugin. Please refer to Plugin Base Abstract Class and Interface.
Thai ขยาย org.joget.plugin.base.ExtDefaultPlugin โปรดอ้างอิงถึงระดับฐานปลั๊กอินและอินเตอร์เฟส
Implemented org.joget.plugin.property.model.PropertyEditable. Please refer to Plugin Base Abstract Class and Interface.
Thai ดำเนินการ org.joget.plugin.property.model.PropertyEditable โปรดอ้างอิงถึง Plugin Base Abstract Class and Interface
A base abstract class to develop a Form Field Element plugin.
Thai คลาสนามธรรมพื้นฐานเพื่อพัฒนาปลั๊กอินองค์ประกอบเขตข้อมูลฟอร์ม
All forms, containers and form fields must extend this class.
Thai ฟอร์มคอนเทนเนอร์และฟิลด์ฟอร์มทั้งหมดต้องขยายคลาสนี้
Method Detail
Thai |
---|
รายละเอียดวิธีการ |
Abstract Methods
Thai |
---|
วิธีการเชิงนามธรรม |
renderTemplate
public abstract java.lang.String renderTemplate(org.joget.apps.form.model.FormData formData, java.util.Map dataModel)
HTML template for front-end UI.
Parameters:
dataModel - Model containing values to be displayed in the template.
Thai เทมเพลต HTML สำหรับ UI ส่วนหน้า
พารามิเตอร์:
dataModel - โมเดลที่มีค่าที่จะแสดงในเทมเพลต
Overridable Methods
Thai |
---|
วิธีการ overridable |
formatData
public org.joget.apps.form.model.FormRowSet formatData(org.joget.apps.form.model.FormData formData)
Method that retrieves loaded or submitted form data, and formats it for a store binder. The formatted data is to be stored and returned in a FormRowSet.in a FormRowSet.
Thai |
---|
วิธีที่ดึงข้อมูลฟอร์มที่โหลดหรือส่งและจัดรูปแบบสำหรับ store binder ข้อมูลที่จัดรูปแบบจะถูกจัดเก็บและส่งคืนใน FormRowSet |
formatDataForValidation
public org.joget.apps.form.model.FormData formatDataForValidation(org.joget.apps.form.model.FormData formData)
Method for override to perform format data in request parameter before execute validation
Thai |
---|
วิธีการแทนที่เพื่อจัดรูปแบบข้อมูลในพารามิเตอร์คำขอก่อนดำเนินการตรวจสอบความถูกต้อง |
selfValidate
public java.lang.Boolean selfValidate(org.joget.apps.form.model.FormData formData)
...
Error message can display with following code:
Thai |
---|
วิธีการแทนที่เพื่อทำการตรวจสอบความถูกต้องระบุสำหรับฟิลด์นี้ ข้อความแสดงข้อผิดพลาดสามารถแสดงด้วยรหัสต่อไปนี้: |
String id = FormUtil.getElementParameterName(this);
...
Render HTML template for UI, with option for form builder design mode. This method will call abstract method renderTemplate for rendering.
Parameters:
includeMetaData - set true to render additional meta required for the Form Builder.
Thai เทมเพลต HTML แสดงผลสำหรับ UI พร้อมตัวเลือกสำหรับโหมดออกแบบตัวสร้างฟอร์ม วิธีนี้จะเรียกวิธีนามธรรม renderTemplate สำหรับการแสดงผล
พารามิเตอร์:
includeMetaData - ตั้งค่าเป็นจริงเพื่อแสดงเมตาเพิ่มเติมที่จำเป็นสำหรับตัวสร้างแบบฟอร์ม
renderErrorTemplate
public java.lang.String renderErrorTemplate(org.joget.apps.form.model.FormData formData, java.util.Map dataModel)
HTML template with errors for front-end UI. This method will call abstract method renderTemplate for rendering.
Parameters:
dataModel - Model containing values to be displayed in the template.
Thai เทมเพลต HTML ที่มีข้อผิดพลาดสำหรับ UI ส่วนหน้า วิธีนี้จะเรียกวิธีนามธรรม renderTemplate สำหรับการแสดงผล
พารามิเตอร์:
dataModel - โมเดลที่มีค่าที่จะแสดงในเทมเพลต
renderReadOnlyTemplate
public java.lang.String renderReadOnlyTemplate(org.joget.apps.form.model.FormData formData, java.util.Map dataModel)
Read-only HTML template for front-end UI (Not used at the moment)
Parameters:
dataModel - Model containing values to be displayed in the template.
Thai เทมเพลต HTML แบบอ่านอย่างเดียวสำหรับ UI ของส่วนหน้า (ไม่ได้ใช้ในขณะนี้)
พารามิเตอร์:
dataModel - โมเดลที่มีค่าที่จะแสดงในเทมเพลต
continueValidation
public boolean continueValidation(org.joget.apps.form.model.FormData formData)
Flag to indicate whether or not continue validating descendent elements.
Thai |
---|
ตั้งค่าสถานะเพื่อระบุว่าจะตรวจสอบความถูกต้องขององค์ประกอบสืบทอดหรือไม่ |
getDynamicFieldNames
public Collection<java.lang.String> getDynamicFieldNames()
Used to create multiple form data column in database by returning extra column names.
Thai |
---|
ใช้เพื่อสร้างคอลัมน์ข้อมูลหลายรูปแบบในฐานข้อมูลโดยส่งคืนชื่อคอลัมน์เพิ่มเติม |
hasError
public java.lang.Boolean hasError(org.joget.apps.form.model.FormData formData)
Flag to indicate whether or not this field has fail the validation process
Thai |
---|
ตั้งค่าสถานะเพื่อระบุว่าฟิลด์นี้ล้มเหลวในกระบวนการตรวจสอบหรือไม่ |
isAuthorize
public java.lang.Boolean isAuthorize(org.joget.apps.form.model.FormData formData)
...
It used property key "permission" to retrieve Form Permission plugin.
Thai |
---|
ตั้งค่าสถานะเพื่อระบุว่าผู้ใช้ที่ล็อกอินปัจจุบันได้รับอนุญาตให้ดูฟิลด์นี้ในแบบฟอร์มหรือไม่ มันใช้คีย์คุณสมบัติ "การอนุญาต" เพื่อดึงปลั๊กอินการอนุญาตแบบฟอร์ม |
Utility Methods
Thai |
---|
วิธีการยูทิลิตี้ |
getChildren
public java.util.Collection<org.joget.apps.form.model.Element> getChildren()
Retrieves all children form field element under this field
Thai |
---|
ดึงฟอร์มลูกทุกฟอร์มในรูปแบบองค์ประกอบเขตข้อมูลภายใต้ฟิลด์นี้ |
getChildren
public void setChildren(java.util.Collection<org.joget.apps.form.model.Element> children)
Retrieves all children form field element under this field
Thai |
---|
ดึงฟอร์มลูกทุกฟอร์มในรูปแบบองค์ประกอบเขตข้อมูลภายใต้ฟิลด์นี้ |
setChildren
public void setChildren(java.util.Collection<org.joget.apps.form.model.Element> children)
Sets form fields as children of this field
Thai |
---|
ตั้งค่าเขตข้อมูลฟอร์มลูกเป็นของเขตข้อมูลนี้ |
getParent
public org.joget.apps.form.model.Element getParent()
Returns the immediate parent for this element.
Thai |
---|
ส่งคืนพาเรนต์ทันทีสำหรับองค์ประกอบนี้ |
setParent
public void setParent(org.joget.apps.form.model.Element parent)
Sets the immediate parent for this element.
Thai |
---|
ตั้งค่าพาเรนต์ปัจจุบันสำหรับองค์ประกอบนี้ |
getPrimaryKeyValue
public java.lang.String getPrimaryKeyValue(org.joget.apps.form.model.FormData formData)
Returns the primary key value for the current element. Defaults to the primary key value of the form.
Thai |
---|
ส่งคืนค่าคีย์หลักสำหรับองค์ประกอบปัจจุบัน ค่าเริ่มต้นเป็นค่าคีย์หลักของแบบฟอร์ม |
getLoadBinder
public org.joget.apps.form.model.FormLoadBinder getLoadBinder()
Get load binder
Thai |
---|
รับโหลด binder |
setLoadBinder
public void setLoadBinder(org.joget.apps.form.model.FormLoadBinder loadBinder)
Set load binder
Thai |
---|
ตั้งค่าโหลด binder |
getOptionsBinder
public org.joget.apps.form.model.FormLoadBinder getOptionsBinder()
Gets an Options Binder
Thai |
---|
รับตัวเลือก Binder |
setOptionsBinder
public void setOptionsBinder(org.joget.apps.form.model.FormLoadBinder optionsBinder)
Sets an Options Binder
Thai |
---|
ตั้งค่า Binder ตัวเลือก |
getStoreBinder
public org.joget.apps.form.model.FormStoreBinder getStoreBinder()
...
Gets a Store Binder
Thai |
---|
รับ Store Binder |
setStoreBinder
public void setStoreBinder(org.joget.apps.form.model.FormStoreBinder storeBinder)
Sets a Store Binder
Thai |
---|
ตั้งค่า Store Binder |
getValidator
public org.joget.apps.form.model.Validator getValidator()
Gets a validator
Thai |
---|
รับตัวตรวจสอบความถูกต้อง |
setValidator
public void setValidator(org.joget.apps.form.model.Validator validator)
Sets a validator
Thai |
---|
ตั้งตัวตรวจสอบความถูกต้อง |
getCustomParameterName
public java.lang.String getCustomParameterName()
If non-null, this is to be used as the HTML input name for the element.
Thai |
---|
หากไม่ใช่ null นี่จะใช้เป็นชื่ออินพุต HTML สำหรับองค์ประกอบ |
setCustomParameterName
public void setCustomParameterName(java.lang.String customParameterName)
Sets a custom parameter name for the HTML input name of the element.
Thai |
---|
ตั้งชื่อพารามิเตอร์ที่กำหนดเองสำหรับชื่ออินพุต HTML ขององค์ประกอบ |
getDefaultPropertyValues
public java.lang.String getDefaultPropertyValues()
Set default Plugin Properties Options value to a new added Field in Form Builder.
Thai |
---|
ตั้งค่าตัวเลือกคุณสมบัติปลั๊กอินเริ่มต้นให้เป็นฟิลด์ที่เพิ่มใหม่ในเครื่องมือสร้างแบบ |
org.joget.apps.form.model.AbstractSubForm
Under wflow-core module
Thai ภายใต้โมดูล wflow-core
Extended org.joget.apps.form.model.Element.
Thai ขยาย org.joget.apps.form.model.
...
Element
- Under wflow-core module
- Extended
Implemented
ElementImplemented
FormContainer.Thai ดำเนินการ org.joget.apps.form.model.
FormContainer
Use to develop a Form Field element which embed a Form as its child.
Thai ใช้เพื่อพัฒนาองค์ประกอบของเขตข้อมูลฟอร์มซึ่งฝังฟอร์มเป็นลูกของมัน
Field Detail
Thai |
---|
รายละเอียดของฟิลด์ |
Constants
Thai |
---|
ค่าคงที่ |
PROPERTY_PARENT_SUBFORM_ID
...
Property key that use to retrieve the field id in parent form used to store subform primary key as reference key.
Thai |
---|
รหัสคุณสมบัติที่ใช้เพื่อดึงข้อมูล ID ฟิลด์ในฟอร์มหลักที่ใช้ในการจัดเก็บคีย์หลักของฟอร์มย่อยเป็นรหัสอ้างอิง |
PROPERTY_SUBFORM_PARENT_ID
...
Property key that use to retrieve the field id in subform used to store parent form primary key as foreign key.
Thai |
---|
รหัสคุณสมบัติที่ใช้เพื่อดึงข้อมูล ID ฟิลด์ในฟอร์มย่อยที่ใช้ในการจัดเก็บแบบฟอร์มหลักของคีย์เป็นคีย์ต่างประเทศ |
Method Detail
Thai |
---|
รายละเอียดวิธีการ |
Overridable Methods
Thai |
---|
วิธีการ overridable |
loadSubForm
protected org.joget.apps.form.model.Form loadSubForm(org.joget.apps.form.model.FormData parentFormData) throws org.springframework.beans.BeansException
Retrieve a Form object as subform. This method will use either value from property key "formDefId" or "json" to construct the Form object.
Thai |
---|
ดึงวัตถุแบบฟอร์มเป็นแบบฟอร์มย่อย วิธีนี้จะใช้ค่าจากคีย์คุณสมบัติ "formDefId" หรือ "json" |
...
เพื่อสร้างวัตถุแบบฟอร์ม |
updateElementParameterNames
...
Update all the parameter name of field elements in subform with a prefix
Thai |
---|
อัพเดตชื่อพารามิเตอร์ทั้งหมดขององค์ประกอบฟิลด์ในฟอร์มย่อยด้วยคำนำหน้า |
populateParentWithSubFormKey
...
Update parent form field value with primary key of subform based on property key of this constant PROPERTY_PARENT_SUBFORM_ID.
Thai |
---|
อัปเดตค่าเขตข้อมูลฟอร์มหลักด้วยคีย์หลักของฟอร์มย่อยตามรหัสคุณสมบัติของ PROPERTY_PARENT_SUBFORM_ID คงที่นี้ |
populateSubFormWithParentKey
...
Update subform field value with primary key of parent form based on property key of this constant PROPERTY_SUBFORM_PARENT_ID.
Thai |
---|
อัปเดตค่าฟิลด์ฟอร์มย่อยด้วยคีย์หลักของฟอร์มหลักโดยยึดตามคีย์คุณสมบัติของ PROPERTY_SUBFORM_PARENT_ID คงที่นี้ |
checkForRecursiveForm
protected boolean checkForRecursiveForm(org.joget.apps.form.model.Element e, java.lang.String id)
Check the subform is not exist in the parent elements tree.
Thai |
---|
ตรวจสอบว่าฟอร์มย่อยไม่มีอยู่ในแผนผังองค์ประกอบพาเรนต์ |
getSubForm
protected org.joget.apps.form.model.Form getSubForm(org.joget.apps.form.model.FormData formData)
Get From object from its children.
Thai |
---|
รับฟอร์ม object จากฟอร์มลูก ๆ |
Interface
Thai |
---|
อินเตอร์เฟซ |
org.joget.apps.form.model.FormBuilderPaletteElement
Under wflow-
core modulecore module
Thai ภายใต้โมดูล wflow-core
Extends interface org.joget.apps.form.model.FormBuilderEditable.
Extends interface orgThai ขยายอินเตอร์เฟส org
..joget.apps.form.model.FormBuilderEditable
Interface that describes meta information used for adding an element into the Form Builder palette.
Thai อินเทอร์เฟซที่อธิบายข้อมูลเมตาที่ใช้สำหรับการเพิ่มองค์ประกอบลงในจานสีตัวสร้างแบบ
Method Detail
Thai |
---|
รายละเอียดวิธีการ |
Interface Methods
Thai |
---|
วิธีการเชื่อมต่อ |
getFormBuilderCategory
public java.lang.String getFormBuilderCategory()
Category for the element in the Form Builder palette
Thai |
---|
หมวดหมู่สำหรับองค์ประกอบในชุดเครื่องมือสร้างแบบฟอร์ม |
getFormBuilderPosition
public int getFormBuilderPosition()
Ordering position. Palette to display based on the position value in ascending order for a category.
Thai |
---|
ตำแหน่ง Ordering Palette ที่จะแสดงตามค่าตำแหน่งในลำดับจากน้อยไปหามากสำหรับหมวดหมู่ |
getFormBuilderIcon
public java.lang.String getFormBuilderIcon()
Path to icon for the element in the Form Builder palette. This path is relative to the context path. Return NULL to use the default icon.
Thai |
---|
Path ไปที่ไอคอนสำหรับองค์ประกอบในชุดเครื่องมือสร้างแบบฟอร์ม Path นี้สัมพันธ์กับPath ส่งคืน NULL เพื่อใช้ไอคอนเริ่มต้น |
getDefaultPropertyValues
public jva.lang.String getDefaultPropertyValues()
Set default Plugin Properties Options value to a new added Field in Form Builder. This method is implemented in org.joget.apps.form.model.Element.
Thai |
---|
ตั้งค่าตัวเลือกคุณสมบัติปลั๊กอินเริ่มต้นให้เป็นฟิลด์ที่เพิ่มใหม่ในเครื่องมือสร้างแบบ วิธีนี้ถูกนำมาใช้ใน org.joget.apps.form.model.Element. |
getFormBuilderTemplate
public java.lang.String getFormBuilderTemplate()
HTML template used for display a new added field in the Form Builder
Thai |
---|
เทมเพลต HTML ที่ใช้สำหรับแสดงฟิลด์ที่เพิ่มใหม่ในเครื่องมือสร้างแบบฟอร์ม |
org.joget.apps.form.model.FormContainer
Under wflow-core module
Thai ภายใต้โมดูล wflow-core
This interface indicate that a Form Field Element is a container and should not create a form data column in database..
Thai อินเทอร์เฟซนี้บ่งชี้ว่าองค์ประกอบเขตข้อมูลฟอร์มเป็นคอนเทนเนอร์และไม่ควรสร้างคอลัมน์ข้อมูลฟอร์มในฐานข้อมูล
No interface method is available in this interface
Thai ไม่มีวิธีการอินเทอร์เฟซในอินเทอร์เฟซนี้
org.joget.apps.form.model.FormOptionsElement
Under wflow-core module
Thai ภายใต้โมดูล wflow-core
This interface indicate that a Form Field Element is a multi options field such as Select Box, Check Box & Radio Button. It can use Form Options Binder to populate its options.
Thai อินเทอร์เฟซนี้บ่งชี้ว่าองค์ประกอบเขตข้อมูลฟอร์มเป็นฟิลด์ตัวเลือกที่หลากหลายเช่นเลือกกล่องกล่องกาเครื่องหมาย & ปุ่มตัวเลือก มันสามารถใช้ Binder ตัวเลือกแบบฟอร์มเพื่อเติมตัวเลือกของมัน
No interface method is available in this interface
Thai ไม่มีวิธีการอินเทอร์เฟซในอินเทอร์เฟซนี้
org.joget.apps.form.model.FormAjaxOptionsElement
Under wflow-core module
Thai ภายใต้โมดูล wflow-core
Extends interface org.joget.apps.form.model.FormOptionsElement.
Thai ขยายส่วนต่อประสาน org.joget.apps.form.model.FormOptionsElement
This interface indicate that a Form Field Element is a multi options field such as Select Box, Check Box & Radio Button. It can use Form Options Binder which implemented org.joget.apps.form.model.FormAjaxOptionsBinder to populate its options using AJAX.AJAX.
Thai อินเทอร์เฟซนี้บ่งชี้ว่าองค์ประกอบเขตข้อมูลฟอร์มเป็นฟิลด์ตัวเลือกที่หลากหลายเช่นเลือกกล่องกล่องกาเครื่องหมาย & ปุ่มตัวเลือก มันสามารถใช้ตัวเลือก Form Options Binder ซึ่งดำเนินการ org.joget.apps.form.model.FormAjaxOptionsBinder เพื่อเติมตัวเลือกโดยใช้ AJAX
Method Detail
Thai |
---|
รายละเอียดวิธีการ |
Interface Methods
Thai |
---|
วิธีการเชื่อมต่อ |
getControlElement
public org.joget.apps.form.model.Element getControlElement(org.joget.apps.form.model.FormData formData)
Get dependent field element which use to control the options of this field
Thai |
---|
รับองค์ประกอบของฟิลด์ที่ขึ้นซึ่งใช้เพื่อควบคุมตัวเลือกของฟิลด์นี้ |
org.joget.apps.form.model.FormReferenceDataRetriever
Under wflow-core module
Thai ภายใต้โมดูล wflow-core
Indicate that this field hold the primary keys for other form data records. The reference records can be retrieve using its interface method.
Thai ระบุว่าฟิลด์นี้มีคีย์หลักสำหรับบันทึกข้อมูลในแบบฟอร์มอื่น ๆ บันทึกการอ้างอิงสามารถดึงข้อมูลได้โดยใช้วิธีการอินเทอร์เฟซ
This interface is used by org.joget.apps.form.service.FormUtil.loadFormData() and org.joget.apps.form.service.FormUtil.loadFormDataJson() method to fetch submitted form data values including data from subforms, and reference fields.
Thai อินเตอร์เฟสนี้ถูกใช้โดย org.joget.apps.form.service.FormUtil.loadFormData() และ org.joget.apps.form.service.FormUtil.loadFormDataJson() เพื่อดึงค่าข้อมูลฟอร์มที่ส่งมารวมถึงข้อมูลจากฟอร์มย่อยและการอ้างอิง
Method Detail
Thai |
---|
รายละเอียดวิธีการ |
Interface Methods
Thai |
---|
วิธีการเชื่อมต่อ |
loadFormRows
public org.joget.apps.form.model.FormRowSet loadFormRows(String[] primaryKeyValues, org.joget.apps.form.model.FormData formData)
Retrieve form data rows for an array of specified primary key values.
Thai |
---|
ดึงแถวข้อมูลแบบฟอร์มสำหรับอาร์เรย์ของค่าคีย์หลักที่ระบุ |
Plugin Properties Options
Thai |
---|
ตัวเลือกคุณสมบัติปลั๊กอิน |
The following are some mandatory properties and system predefined properties can be used in your Plugin Properties Options JSON file. Please refer to Plugin Properties Options for more information.
Thai ต่อไปนี้เป็นคุณสมบัติบังคับและคุณสมบัติที่กำหนดไว้ล่วงหน้าของระบบสามารถใช้ในไฟล์ JSON ตัวเลือกคุณสมบัติปลั๊กอิน โปรดดู Plugin Properties Options สำหรับข้อมูลเพิ่มเติม
Mandatory Property
Thai |
---|
คุณสมบัติบังคับ |
id
All Form Element Field must has this property appear in the Properties Options JSON.
Thai ฟิลด์องค์ประกอบของฟอร์มทั้งหมดต้องมีคุณสมบัตินี้ปรากฏในตัวเลือกคุณสมบัติ JSON
This is used as unique identifier of a field in a form.
Thai สิ่งนี้ใช้เป็นตัวระบุที่ไม่ซ้ำกันของเขตข้อมูลในแบบฟอร์ม
Code Block | ||
---|---|---|
| ||
{ name : 'id', label : '@@form.textfield.id@@', type : 'textfield', required : 'True', regex_validation : '^[a-zA-Z0-9_]+$', validation_message : '@@form.textfield.invalidId@@' } |
Predefined Property
Thai |
---|
คุณสมบัติที่กำหนดไว้ล่วงหน้า |
loadBinder
If this property appear in the Properties Options JSON, admin user is able to choose a Form Load Binder.
Thai หากคุณสมบัตินี้ปรากฏในตัวเลือกคุณสมบัติ JSON ผู้ใช้ที่เป็นผู้ดูแลระบบสามารถเลือก Form Load Binder
The value of this property will auto convert into Form Load Binder Plugin and the plugin can be retrieved by getLoadBinder method.
Thai ค่าของคุณสมบัตินี้จะแปลงเป็นปลั๊กอินโหลดแบบฟอร์มอัตโนมัติและปลั๊กอินสามารถเรียกคืนได้โดยวิธี getLoadBinder
Code Block |
---|
{ name:'loadBinder', label:'@@form.subform.loadBinder@@', type:'elementselect', options_ajax:'[CONTEXT_PATH]/web/property/json/getElements?classname=org.joget.apps.form.model.FormLoadElementBinder', url:'[CONTEXT_PATH]/web/property/json[APP_PATH]/getPropertyOptions', value:'org.joget.apps.form.lib.WorkflowFormBinder', required:'True' } |
optionsBinder
If this property appear in the Properties Options JSON, admin user is able to choose a Form Options Binder.
Thai หากคุณสมบัตินี้ปรากฏใน JSON ตัวเลือกคุณสมบัติผู้ใช้ที่เป็นผู้ดูแลระบบสามารถเลือกแบบฟอร์ม Binder ตัวเลือก
The value of this property will auto convert into Form Options Binder Plugin and the plugin can be retrieved by getOptionsBinder method.
Thai ค่าของคุณสมบัตินี้จะแปลงเป็นปลั๊กอินตัวเลือกแบบฟอร์มโดยอัตโนมัติและปลั๊กอินสามารถเรียกคืนได้ด้วยวิธีการ getOptionsBinder
Code Block |
---|
{ name : 'optionsBinder', label : '@@form.checkbox.chooseOptionsBinder@@', type : 'elementselect', options_ajax : '[CONTEXT_PATH]/web/property/json/getElements?classname=org.joget.apps.form.model.FormLoadOptionsBinder', url : '[CONTEXT_PATH]/web/property/json[APP_PATH]/getPropertyOptions' } |
permission
If this property appear in the Properties Options JSON, admin user is able to choose a Form Permission.
Thai หากคุณสมบัตินี้ปรากฏในตัวเลือกคุณสมบัติ JSON ผู้ใช้ที่เป็นผู้ดูแลระบบสามารถเลือกแบบฟอร์มการอนุญาต
The value of this property will auto convert into Form Permission Plugin and the plugin is used
by isAuthorize method.Thai ค่าของคุณสมบัตินี้จะแปลงเป็นปลั๊กอินสิทธิ์ในแบบฟอร์มโดยอัตโนมัติและปลั๊กอินถูกใช้โดยเมธอด isAuthorize
Code Block |
---|
{ name:'permission', label:'@@form.form.permission@@', type:'elementselect', options_ajax:'[CONTEXT_PATH]/web/property/json/getElements?classname=org.joget.apps.form.model.FormPermission', url:'[CONTEXT_PATH]/web/property/json[APP_PATH]/getPropertyOptions' } |
storeBinder
If this property appear in the Properties Options JSON, admin user is able to choose a Form Store Binder.
Thai หากคุณสมบัตินี้ปรากฏในตัวเลือกคุณสมบัติ JSON ผู้ใช้ที่เป็นผู้ดูแลระบบสามารถเลือก Form Store Binder ได้
The value of this property will auto convert into Form Store Binder Plugin and the plugin can be retrieved by getSoreBinder method.
Thai ค่าของคุณสมบัตินี้จะแปลงเป็นปลั๊กอิน Form Store Binder โดยอัตโนมัติและสามารถเรียกคืนปลั๊กอินได้โดยวิธี getSoreBinder
Code Block |
---|
{ name:'storeBinder', label:'@@form.form.storeBinder@@', type:'elementselect', options_ajax:'[CONTEXT_PATH]/web/property/json/getElements?classname=org.joget.apps.form.model.FormStoreElementBinder', url:'[CONTEXT_PATH]/web/property/json[APP_PATH]/getPropertyOptions' } |
readonly
System use this property to flag a field a readonly.
Thai ระบบใช้คุณสมบัตินี้เพื่อตั้งค่าสถานะฟิลด์เป็นแบบอ่านอย่างเดียว If this property appear in the Properties Options JSON, admin user can force this field to display as readonly.
Thai หากคุณสมบัตินี้ปรากฏในตัวเลือกคุณสมบัติ JSON ผู้ใช้ที่เป็นผู้ดูแลระบบสามารถบังคับให้ฟิลด์นี้แสดงผลแบบอ่านอย่างเดียว
This value is ignored if the parent form is set to readonly
Thai ค่านี้จะถูกละเว้นหากตั้งค่าฟอร์มหลักเป็นแบบอ่านอย่างเดียว
Code Block |
---|
{ name : 'readonly', label : '@@form.checkbox.readonly@@', type : 'checkbox', value : 'false', options : [{ value : 'true', label : '' }] } |
readonlyLabel
System use this property to flag a field a readonly field should display as label or not.
Thai ระบบใช้คุณสมบัตินี้เพื่อตั้งค่าสถานะเขตข้อมูลเขตข้อมูลแบบอ่านอย่างเดียวควรแสดงเป็นป้ายกำกับหรือไม่
If this property appear in the Properties Options JSON, admin user can force this field to display as label when it is readonly.
Thai หากคุณสมบัตินี้ปรากฏในตัวเลือกคุณสมบัติ JSON ผู้ใช้ที่เป็นผู้ดูแลระบบสามารถบังคับให้ฟิลด์นี้แสดงเป็นป้ายกำกับเมื่ออ่านได้อย่างเดียว
This value is ignored if the parent form is set to display as label when it is readonly
Thai ค่านี้จะถูกข้ามหากฟอร์มหลักถูกตั้งค่าให้แสดงเป็นป้ายกำกับเมื่ออ่านได้อย่างเดียว
Code Block |
---|
{ name : 'readonlyLabel', label : '@@form.checkbox.readonlyLabel@@', type : 'checkbox', value : 'false', options : [{ value : 'true', label : '' }] } |
workflowVariable
If this property appear in the Properties Options JSON, admin user is set to store this field value to a workflow variable.
Thai หากคุณสมบัตินี้ปรากฏในตัวเลือกคุณสมบัติ JSON ผู้ใช้ที่เป็นผู้ดูแลระบบจะถูกตั้งค่าให้เก็บค่าฟิลด์นี้เป็นตัวแปรเวิร์กโฟลว์
The value of this field will auto set to the mentioned workflow variable if the Form Store Binder is set to Workflow Form Binder.
Thai ค่าของฟิลด์นี้จะตั้งค่าโดยอัตโนมัติเป็นตัวแปรเวิร์กโฟลว์ที่กล่าวถึงหาก Form Store Binder ถูกตั้งค่าเป็น Workflow Form Binder
Code Block |
---|
{ name : 'workflowVariable', label : '@@form.checkbox.workflowVariable@@', type : 'textfield' } |
value
If this property appear in the Properties Options JSON, admin user is able to set a default value for
this field.this field.
Thai หากคุณสมบัตินี้ปรากฏในตัวเลือกคุณสมบัติ JSON ผู้ใช้ที่เป็นผู้ดูแลระบบสามารถตั้งค่าเริ่มต้นสำหรับฟิลด์นี้ได้
Code Block |
---|
{ name : 'value', description : '@@form.checkbox.value.desc@@', label : 'Default @@form.checkbox.value@@', type : 'textfield' } |
validator
If this property appear in the Properties Options JSON, admin user is able to choose a Form Validator.
Thai หากคุณสมบัตินี้ปรากฏในตัวเลือกคุณสมบัติ JSON ผู้ใช้ที่เป็นผู้ดูแลระบบสามารถเลือกตัวตรวจสอบความถูกต้องของฟอร์ม
The value of this property will auto convert into Form Validator Plugin and the plugin can be retrieved by getValidator method.
Thai ค่าของคุณสมบัตินี้จะแปลงเป็นปลั๊กอินตัวตรวจสอบความถูกต้องของแบบฟอร์มโดยอัตโนมัติและสามารถเรียกคืนปลั๊กอินด้วยวิธีการ getValidator
Form Field Element Template Sample
Thai |
---|
ตัวอย่างเทมเพลตองค์ประกอบฟิลด์ของฟอร์ม |
Following is a sample Form Field Template of a Text Field element. It is constructed using FreeMaker syntax. This template will be used and returned by renderTemplate method.
Thai |
---|
ต่อไปนี้เป็นตัวอย่างแม่แบบฟิลด์ขององค์ประกอบ Text Field มันถูกสร้างขึ้นโดยใช้ไวยากรณ์ FreeMaker เทมเพลตนี้จะใช้และส่งคืนโดยวิธี renderTemplate |
Code Block | ||
---|---|---|
| ||
@Override public String renderTemplate(FormData formData, Map dataModel) { String templateName = "textField.ftl"; // set value String value = FormUtil.getElementPropertyValue(this, formData); dataModel.put("value", value); String html = FormUtil.generateElementHtml(this, formData, templateName, dataModel); return html; } |
...
Code Block | ||
---|---|---|
| ||
<div class="form-cell" ${elementMetaData!}> <label class="label"> ${element.properties.label} <span class="form-cell-validator">${decoration}</span> <#if error??> <span class="form-error-message">${error}</span> </#if> </label> <#if (element.properties.readonly! == 'true' && element.properties.readonlyLabel! == 'true') > <div class="form-cell-value"><span>${value!?html}</span></div> <input id="${elementParamName!}" name="${elementParamName!}" type="hidden" value="${value!?html}" /> <#else> <input id="${elementParamName!}" name="${elementParamName!}" type="text" size="${element.properties.size!}" value="${value!?html}" maxlength="${element.properties.maxlength!}" <#if error??>class="form-error-cell"</#if> <#if element.properties.readonly! == 'true'>readonly</#if> /> </#if> </div> |
Explanations
A form field element template should be wrapped under a div with "form-cell" class.
Thai เทมเพลตองค์ประกอบของเขตข้อมูลฟอร์มควรอยู่ภายใต้ div ที่มีคลาส "form-cell"
${elementMetaData!} need to put in the ".form-cell" div. It is used by Form Builder.
Thai $ {elementMetaData!} จำเป็นต้องใส่ div ".form-cell" มันถูกใช้โดยเครื่องมือสร้างแบบฟอร์ม
A useable field element template must handle the following states of a field.
Thai เท็มเพลตองค์ประกอบของฟิลด์ที่ใช้ได้จะต้องจัดการกับสถานะของฟิลด์ต่อไปนี้
- Has errors
- Readonly
- Readonly and needed to display as label
- Normal display
Tutorials
Thai |
---|
สอน |
- Guideline for developing a plugin
- File Upload Form Element Integrated with Amazon S3
- How to develop a Mood Rating Form Field
Related Community Plugins
Thai |
---|
ปลั๊กอินที่เกี่ยวข้อง |
- Check Box
org.joget.apps.form.lib.CheckBox (wflow-core) - Custom HTML
org.joget.apps.form.lib.CustomHTML (wflow-core) - Date Picker
org.joget.apps.form.lib.DatePicker (wflow-core) - File Upload
org.joget.apps.form.lib.FileUpload (wflow-core) - Grid
org.joget.apps.form.lib.Grid (wflow-core) - Hidden Field
org.joget.apps.form.lib.HiddenField (wflow-core) - Id Generator Field
org.joget.apps.form.lib.IdGeneratorField (wflow-core) - Password Field
org.joget.apps.form.lib.PasswordField (wflow-core) - Radio Button
org.joget.apps.form.lib.Radio (wflow-core) - Select Box
org.joget.apps.form.lib.SelectBox (wflow-core) - Subform
org.joget.apps.form.lib.SubForm (wflow-core) - Text Area
org.joget.apps.form.lib.TextArea (wflow-core) - Text Field
org.joget.apps.form.lib.TextField (wflow-core)
...