CreateAnother Retain Some Data
With the panel builder, CreateAction, how can i retain data when a user clicks the create another button? Ive seen quite a few different ways to go about it, but none of them seemed that clean or native. Right now I am not even doing a custom action() and hoping i dont have to redo that whole process.
5 Replies
This works, but not my favorite solution as i have to include a lot of logic that im not overriding. If i can avoid it, please let me know. Im then calling it with:
ah shoot, this would require changes based on if this is a standalone or table action too. grrr
There has to be a better way to do this. Seems pretty natural to want some customization with create another fills
I needed something similar but also wasn't satisfied. I simply get the latest created model and fill it with that. This will inevitably introduce race conditions though. But in my case it was only for models that also have a user_id on it so it was no big deal🤔
I used a different approach by redirecting the logic about another in the engorged create method.
@青木 its changed a lot since then, its already natively available now
Is the way you use different from me? I want to know how you do it.