mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Add support for custom placeholder text
This commit is contained in:
parent
3756bd6668
commit
6d73265f0e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user