mirror of
https://github.com/dzeiocom/FormManager.git
synced 2025-04-23 11:22:11 +00:00
Added a first version of data-autoset
This commit is contained in:
parent
5f3ba54ccf
commit
aab4c0bc66
@ -167,6 +167,16 @@ export default class FormManager {
|
||||
|
||||
//Setup the system for basic inputs
|
||||
this.setupInputs()
|
||||
|
||||
setInterval(() => {
|
||||
this.form.querySelectorAll("[data-autoset]").forEach((el: HTMLInputElement) => {
|
||||
let autosetStr = el.dataset.autoset
|
||||
if (autosetStr.startsWith("run:")) {
|
||||
let tmp = autosetStr.split("run:")[1]
|
||||
el.value = eval(tmp)
|
||||
}
|
||||
})
|
||||
}, 500)
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user