Skip to content
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

Add support custom field types to form config and pydantic model #127

Closed
signebedi opened this issue Mar 30, 2024 · 5 comments
Closed

Add support custom field types to form config and pydantic model #127

signebedi opened this issue Mar 30, 2024 · 5 comments

Comments

@signebedi
Copy link
Owner

signebedi commented Mar 30, 2024

We should add support for a hidden field, as well as maybe the following:

  1. immutable_user_field - shows some unchangeable field pulled from the current user's data
  2. user_list - list of current users, ordered alphabetically, with some selected field from the data model (id, username, email seem most likely). Maybe allow to select by group?
  3. resizable_textarea - maybe we just set this as the default behavior for textarea fields...
  4. autoselect - allows users to begin typing their answer and have it filled automatically.
  5. bool_switch - allows users to toggle value between true/false (or yes/no)
@signebedi
Copy link
Owner Author

Add support for database queries and callables as form backends
This is potentially very complex. Sometimes, a select, radio, or checkbox field will want to draw its options from a callable or database query. This can be a little finicky, so we'll approach it gradually.

@signebedi
Copy link
Owner Author

signebedi commented Jun 23, 2024

We've implemented the better part of these features in #150 and elsewhere. However, the following still need implementation.

hidden field - we should also add options to make_visible_in_edits and secondary_input_type
immutable_user_field - shows some unchangeable field pulled from the current user's data
bool_switch - allows users to toggle value between true/false (or yes/no)

@signebedi
Copy link
Owner Author

Add hidden field input types
We should also add options to make_visible_in_edits and secondary_input_type

@signebedi
Copy link
Owner Author

Add immutable_user_field field input types
Shows some unchangeable field pulled from the current user's data, like their groups, username, relationships, etc.

@signebedi
Copy link
Owner Author

Add bool_switch field input types
Allows users to toggle value between true/false (or yes/no). Maybe we add a true_label and false_label option if end users want to mask these for the end user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant