Add support for custom placeholder text

This commit is contained in:
Oliver 2021-07-02 19:47:47 +10:00
parent 3756bd6668
commit 6d73265f0e

View File

@ -235,6 +235,7 @@ function constructDeleteForm(fields, options) {
* - secondary: Define a secondary modal form for this field
* - label: Specify custom label
* - help_text: Specify custom help_text
* - placeholder: Specify custom placeholder text
* - value: Specify initial value
* - hidden: Set to true to hide the field
* - icon: font-awesome icon to display before the field
@ -368,6 +369,11 @@ function constructFormBody(fields, options) {
fields[field].label = field_options.label;
}
// Custom placeholder
if (field_options.placeholder) {
fields[field].placeholder = field_options.placeholder;
}
// Field prefix
if (field_options.prefix) {
fields[field].prefix = field_options.prefix;