Skip to content

Conversation

@benjaminleonard
Copy link
Contributor

@benjaminleonard benjaminleonard commented Mar 14, 2024

Resurrecting this experiment as a discussion / reference for #2063. Came out of a suggestion from @taspelund.

The idea being that the user can use a resource as a template to create a new one. In this case the instance create form is pre-filled with the appropriate fields from another one. It essentially passes another instance in the URL param, which is then retrieved and sets the values in the form.

This is a quick test implementation, not a model for actually doing it. In practice we might be able to use get the instance in the loader and pass the values to defaultValues, avoiding the use of setValues all together.

CleanShot 2024-01-26 at 11 49 16

@vercel
Copy link

vercel bot commented Mar 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
console ✅ Ready (Inspect) Visit Preview Mar 14, 2024 11:21am

@david-crespo
Copy link
Collaborator

Very cool, love the use of the query param. Definitely going to want to do the loader + defaultValues approach.

@benjaminleonard
Copy link
Contributor Author

I think we can close this and redo it later based on #2250

@benjaminleonard benjaminleonard deleted the instance-template branch October 14, 2025 13:24
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

Successfully merging this pull request may close these issues.

3 participants