Add "required" parameter to pywebio.input.checkbox #177
quadratecode
started this conversation in
Feature request
Replies: 1 comment 1 reply
-
The reason that def validate(opt):
# print(opt)
if not opt:
return "You must accept the terms to continue"
input_group("Sign up", [
input("User name", name='user', required=True),
checkbox(options=["I accept the terms"], name='term', validate=validate)
]) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First of all: Thanks to the devs for this excellent tool.
According to the docs,
pywebio.input.checkbox
does not support the "required" parameter like most other input types.In cases where the checkbox is typically required (e.g. terms and conditions), the script continues even if they do not check it, hence this feature request. Is there a workaround to this problem?
Beta Was this translation helpful? Give feedback.
All reactions