
內容簡介
- SilkyPress Input Field Block 外掛創建了一個名為 Input Field 的區塊,可以添加到 Checkout Block 的內部區塊中。
- 添加一個區塊將向結帳表單添加一個自定義字段。此區塊可以根據需要添加到 Checkout Block 中,並且可以在同一插入位置中多次插入。
- Input Field 區塊的設置還包括以下項目:字段類型(文本、select、勾選框、單選框、多行文本框)、標籤、ID、選項(僅適用於 select 和單選框字段)、幫助文本(顯示在輸入字段下方)、佔位符(僅適用於文本和多行文本框字段)、是否必填(在前端對輸入字段進行必填驗證)。
- 從前端收集到的輸入字段的值將被保存在數據庫中,作為附加到訂單的自定義字段。
- Input Field 區塊還可以選擇在管理後台的訂單頁面上顯示輸入字段的值,或在客戶下單後顯示的訂單確認頁面上顯示,或在客戶下單後收到的訂單郵件中顯示。
外掛標籤
開發者團隊
原文外掛簡介
Basically, it is a checkout field editor plugin, but for the WooCommerce block checkout
The WooCommerce block checkout can be edited directly from the Gutenberg editor (open the “WP Admin -> Pages -> Checkout” for editing). By default WooCommerce allows adding only Paragraph/Image/Separator inner blocks to the checkout block. The SilkyPress Input Field Block plugin lets you add inner blocks with a custom input field to the checkout block.
The plugin creates a block, called Input Field, which can be added to an inner block of the Checkout Block. One instance of the block will add one custom field to the checkout form. The block can be added as many times as necessary to the Checkout Block and can be inserted more than one time within the same inserter place of the Checkout Block.
Input Field block settings
After adding an Input Field inner block to the checkout block, you can change its settings in the Block Inpector on the right side of the editor. Within the settings General tab you can set its:
– Field type (Text, Select, Checkbox, Radio or Textarea)
– Label
– Id
– Default value
– Help text
Input Field validation on the frontend
In the Validation tab you can toggle the input field as to be required or optional. On the frontend, if a required input field is left empty by the customer, then, upon clicking the Place Order button, the Please fill this field error message will be shown.
Storing the value of the Input Field
After clicking the Place Order button, the value of the Input Field will be saved to the database as a custom field associated with the order.
In the Presentation tab of the Input Field block’s settings you can enable:
– the Show on Order page option so that the field’s value will show up on the Edit Order page in the admin
– the Show on Order Confirmation option so that the field’s value will show up on the customer’s Order Confirmation page (formally known as Thank You page)
– the Show on Order Email option so that the field’s value will show up in the email the customer receives after placing the order.
