-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support for hiding fields #171
base: master
Are you sure you want to change the base?
Conversation
@squallstar Why not just create a field type called |
@squallstar And, a reminder for https://github.com/Fliplet/fliplet-studio/issues/2520 It'll be good that as we add more features we enhance JS APIs at the same time rather than waiting for a separate round of dev. |
@tonytlwu Judging from what Jo said on the other ticket, I think a hidden field makes sense to us as developers, but less to users. Furthermore, having it enabled on any field means that validation and other settings are kept. |
@squallstar I see. I agree with where we're heading with this then. I think there could be a few issues, though with validation and hidden fields that we should explore and verify.
|
@tonytlwu I can easily toggle |
@tonytlwu you OK with this? |
@squallstar But to a user, they might want a field to be hidden but required (despite the browser doesn't by default support this). As we further enhance the UI for users to bind the field to a specific value, e.g. email, user might want to hide an email field and specify that it's required. I don't mind removing the
Basically, by hiding a field all the currently configurable and implicit validation rules still need to work. I imagine the errors will still be displayed at the bottom near the submit button, but because it's hidden it won't be highlighted. |
@tonytlwu I've managed to add a simple validation for required hidden fields with no value: Anything else, like email/pattern/length validation would be much more complex and more importantly reinventing the wheel. |
Just thought of another one too, extending the list to:
I thought it might be quite complex. That doesn't say anything about why we shouldn't do it though because you're essentially taking away features when a setting is enabled. |
@tonytlwu can this PR be closed? Just wondering if this has been implemented by Upplabs/Xor already. |
@squallstar No, this feature was never implemented. See template. Product needs to confirm the scope and priority of this before we review and retest this PR. |
ref https://github.com/Fliplet/fliplet-studio/issues/4349