Added an input_hidden helper.

This commit is contained in:
Relintai 2022-01-07 22:58:12 +01:00
parent 2482e66c12
commit d9c36d0a4e
2 changed files with 13 additions and 0 deletions

View File

@ -3211,6 +3211,18 @@ HTMLTag *HTMLBuilder::input_week(const String &name, const String &cls, const St
return t;
}
HTMLTag *HTMLBuilder::input_hidden(const String& name, const String& value) {
HTMLTag *t = input_hidden();
t->name(name);
if (value != "") {
t->value(value);
}
return t;
}
void HTMLBuilder::f() {
write_tag();
}

View File

@ -500,6 +500,7 @@ public:
HTMLTag *input_time(const String& name, const String& cls = "", const String& id = "", const String& vmin = "", const String& vmax = "", const String& vstep = "");
HTMLTag *input_url(const String& name, const String& value = "", const String& placeholder = "", const String& cls = "", const String& id = "", const String& minlength = "", const String& maxlength = "", const String& size = "");
HTMLTag *input_week(const String& name, const String& cls = "", const String& id = "", const String& vmin = "", const String& vmax = "");
HTMLTag *input_hidden(const String& name, const String& value);
void f();