22 #ifndef EMBAJAXVALIDATINGTEXTINPUT_H
23 #define EMBAJAXVALIDATINGTEXTINPUT_H
30 _attributes = EmbAJAXBase::null_string;
31 _placeholder =
nullptr;
34 void print()
const override {
35 EmbAJAXBase::_driver->printFormatted(
"<input type=\"text\" id=", HTML_QUOTED_STRING(
EmbAJAXTextInput<SIZE>::_id),
" maxLength=", INTEGER_VALUE(SIZE-1),
36 " size=", INTEGER_VALUE(min(max(SIZE, (
size_t) 11), (
size_t) 41) - 1),
" ", PLAIN_STRING(_attributes),
37 " onInput=\"doRequest(this.id, this.value); this.checkValidity();\"");
41 if (_placeholder != 0) {
47 EmbAJAXBase::_driver->printContent(
"/>");
51 _placeholder = placeholder;
70 _attributes = attributes;
73 const char* _attributes;
74 const char* _placeholder;
void printAttribute(const char *name, const char *value)
Definition: EmbAJAX.cpp:106
A text input field.
Definition: EmbAJAX.h:387
Definition: EmbAJAXValidatingTextInput.h:27
void setPlaceholder(const char *placeholder)
Definition: EmbAJAXValidatingTextInput.h:50
void setCustomValidationAttributes(const char *attributes)
Definition: EmbAJAXValidatingTextInput.h:69
void setPattern(const char *pattern)
Definition: EmbAJAXValidatingTextInput.h:59