-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
better generate all
forms
#367
Comments
Those are cool suggestions! Some of that is done in the linked PR. When you mention the dropdown, I'm assuming this is for a form where we're creating a new record that belongs to a user, and we want a dropdown (and potentially a search filter in it) that shows a list of users that should be associated with the record right? I'm actually not sure how we handle field relationships in the linked PR so gonna look into that actually, but it think it might be better to do that in a separate PR and ship what we have so far first, but up to Brandon and Aleksandra |
Yep, agree! @Vandivier I think this issue: blitz-js/blitz#2038 covers some of your points. The additional thing would be the dropdown, right? |
I marked it as blocked, so that we merge @roesh's PR first. |
I'm going to close this issue as a duplicate of: blitz-js/blitz#2038. Feel free to open a new one for all the additional features that are not included in blitz-js/blitz#2038. |
yall rock, thank you!! |
What do you want and why?
As a developer, I would like appropriately detailed forms to be generated based on my model, so that I can save time!
Possible implementation(s)
when making new.tsx, add additional input fields based on the model. this could get complex quickly, but a simple starting point would be to do this only for string fields. So instead of a name input, there would be a LabeledTextField for each string field on the new model.
also the mutation could be updated appropriately, eg:
Additional context
longer-term, it would be cool to automatically make a drop down so that I can pick a user. for example, consider a "Task" model or a "Contact" model like:
blitz generate all contact firstName lastName phone address addressLine2 city state zip email belongsTo:user?
then a dropdown that is prepopulated with users could be provided so that I can pick a user by a readable name instead of having to look up ID in a DB
The text was updated successfully, but these errors were encountered: