addField(char* var, string fieldLab, uint maxLen, char type = 'L')
reference to org variable | html field label | max nr of char | Optional "special field" char
These fields are added to the "App Settings" page in config mode and saved to eeprom. Updated values are returned to the original variable.
By default added fields will be renderd like the input field "TEXTLINE" in the pic above. You can use the other field types by adding the optional "special field" char. For more info about these fields have a look at the "VirginSoil-Full" example and the list below.
Currently only char arrays are supported. Use functions like atoi() and atof() to transform the char array to integers or floats Use dPinConv() to convert Dpin numbers(pin-name) to integers (D6 > 14)
Example:
...
char* LEDpin = "D4";
char* lbl1 = "Light Show";
setup () {
...
IAS.addField(LEDpin, "ledPin", 2, \'P\');
IAS.addField(lbl1, "Label 1", 16);
IAS.begin();
}
Currently we support the fieldtypes mentioned below.
char | field type |
L | textLine (default) |
T | Textarea |
N | Number |
C | Checkbox |
S | Select |
I | Interval |
P | Pinnumber |
Z | timeZone |