devices.sensor.community icon indicating copy to clipboard operation
devices.sensor.community copied to clipboard

Dynamic hardware configuration form

Open Informatic opened this issue 5 years ago • 0 comments

Internally Hardware configuration part of sensor registration/settings form supports arbitrary number of sensors, but right now only 2 sets of fields are rendered. This needs a couple of lines of javascript to handle special button that'd dynamically clone one of the rows and replace -0- part of all name, id and for attributes of <input> fields with consecutive numbers.

Related code: https://github.com/opendata-stuttgart/meine-luftdaten-info/blob/c92728bfa7e91c6803b3ad3f88969b24bc20bcda/webapp/templates/sensor-settings-form.html#L29-L36

Informatic avatar Apr 07 '19 10:04 Informatic