如何将占位符属性添加到输入字段
How to add the placeholder attribute to input fields
文档中没有任何内容,将其添加到 .isml 文件也不起作用。
<isFormField formparameter="#webform:PhoneHome#"
label="account.default_address.phonehome.label"
messageprefix="#addressKeyPrefix#"
value="#valuePhoneHome#"
placeholder="1-234-567-9810"
>
这是定义。它没有占位符输入参数。您将不得不覆盖此模块并扩展它。
在这里找到它:
app_sf_responsive/staticfiles/cartridge/templates/default/modules/address/forms/inc/Modules.isml
Parameters:
- formparameter (mandatory)
The form parameter which delivers default values for id and value as well as logic for validation and error messages
- id
Used to link label and input field. If no id is specified, one will automatically be generated from the from parameter
- label
The text displayed as the form field's label. Can be a localization tag as well as a hard coded string. If no label parameter is specified, no label will be rendered
- value
Used to prefill the input field. If no value parameter is defined, the form parameter's value will be used as fallback
- fieldname
The name of the input field
- groupclass
CSS class which is appended to the div surrounding label and input field
- showtooltip (default=false)
If it is true, a tooltip will be rendered, the following tooltip parameters are required
- tooltip_linktext
If a tooltip is rendered, this text is displayed as the tooltip's link text. Can be a localization tag as well as a hard coded string
- tooltip_headline
If a tooltip is rendered, this text is displayed as the tooltip's headline. Can be a localization tag as well as a hard coded string
- tooltip_content (mandatory for tooltips)
This text is displayed as the tooltip's content text. Can be a localization tag as well as a hard coded string. If no tooltip_content parameter is set, no tooltip will be rendered at all
<ismodule template="modules/address/forms/inc/FormField"
name="FormField"
attribute="formparameter"
attribute="id"
attribute="label"
attribute="value"
attribute="fieldname"
attribute="groupclass"
attribute="messageprefix"
attribute="showtooltip"
attribute="tooltip_linktextkey"
attribute="tooltip_headlinekey"
attribute="tooltip_contentkey"
strict="true"
/>
要扩展,请在自定义墨盒中创建 Modules.isml
和 FormField.isml
模板。确保使用新 isml 模板向导中的“覆盖现有 ”按钮,以便覆盖 app_sf_responsive 购物车中的 isml 文件。
将占位符属性添加到Modules.isml
,并在FormField.isml
模板中读出。在表单中使用您新修改的模块。
从 Intershop 7.6 开始,您可以直接对作为 a_responsive 的一部分交付的 isml 进行更改,而无需覆盖。
无论如何,我会为此追踪一个缺陷。所以我们也可以修复它。您使用的是什么版本?
文档中没有任何内容,将其添加到 .isml 文件也不起作用。
<isFormField formparameter="#webform:PhoneHome#"
label="account.default_address.phonehome.label"
messageprefix="#addressKeyPrefix#"
value="#valuePhoneHome#"
placeholder="1-234-567-9810"
>
这是定义。它没有占位符输入参数。您将不得不覆盖此模块并扩展它。
在这里找到它:
app_sf_responsive/staticfiles/cartridge/templates/default/modules/address/forms/inc/Modules.isml
Parameters:
- formparameter (mandatory)
The form parameter which delivers default values for id and value as well as logic for validation and error messages
- id
Used to link label and input field. If no id is specified, one will automatically be generated from the from parameter
- label
The text displayed as the form field's label. Can be a localization tag as well as a hard coded string. If no label parameter is specified, no label will be rendered
- value
Used to prefill the input field. If no value parameter is defined, the form parameter's value will be used as fallback
- fieldname
The name of the input field
- groupclass
CSS class which is appended to the div surrounding label and input field
- showtooltip (default=false)
If it is true, a tooltip will be rendered, the following tooltip parameters are required
- tooltip_linktext
If a tooltip is rendered, this text is displayed as the tooltip's link text. Can be a localization tag as well as a hard coded string
- tooltip_headline
If a tooltip is rendered, this text is displayed as the tooltip's headline. Can be a localization tag as well as a hard coded string
- tooltip_content (mandatory for tooltips)
This text is displayed as the tooltip's content text. Can be a localization tag as well as a hard coded string. If no tooltip_content parameter is set, no tooltip will be rendered at all
<ismodule template="modules/address/forms/inc/FormField"
name="FormField"
attribute="formparameter"
attribute="id"
attribute="label"
attribute="value"
attribute="fieldname"
attribute="groupclass"
attribute="messageprefix"
attribute="showtooltip"
attribute="tooltip_linktextkey"
attribute="tooltip_headlinekey"
attribute="tooltip_contentkey"
strict="true"
/>
要扩展,请在自定义墨盒中创建 Modules.isml
和 FormField.isml
模板。确保使用新 isml 模板向导中的“覆盖现有 ”按钮,以便覆盖 app_sf_responsive 购物车中的 isml 文件。
将占位符属性添加到Modules.isml
,并在FormField.isml
模板中读出。在表单中使用您新修改的模块。
从 Intershop 7.6 开始,您可以直接对作为 a_responsive 的一部分交付的 isml 进行更改,而无需覆盖。 无论如何,我会为此追踪一个缺陷。所以我们也可以修复它。您使用的是什么版本?