Custom Action that displays modal that contains a value to only be copyable? Help..
I want to create something like this so that I do not have to use a custom component which is currently used.. How would this be properly done? Would I use a form attatched to an action or what?
20 Replies
Sure, just make the input readonly with the extraInputAttributes() method.
And just make your description text the label.
But doesn't the value have to be in a form and doesn't it have to come from the database?
It can't come from database because the value is hashed by then
You can just set the state of the input.
Can you give me an example of that?
I have to do Field::make('something') though right?
Filament
Actions - Pages - Admin Panel - Filament
The elegant TALL stack admin panel for Laravel artisans.
That’s for page actions, but they all have the mountUsing() method.
Thank you will try
Yeah I don't think this is possible with my use case unfortunately.. but thanks
I willing to bet it is.
On my phone at the moment, but if you haven’t figured it out I’ll try to write it tomorrow.
I will put the PHP class in here. If you can I would be surprised
I might have to send pictures though because the class is close to 300 lines long
Just put it in a private gist and send it to me through Pm.
Can I do that if the code isn't committed?
Actually I'm gonna go ahead an commit it as is right now because I like it, but then you can look at it through github
Ok. But yes. A gist is just arbitrary code. So you’d just copy paste into the gist.
GitHub
filament-companies/APITokens.php at 8ff54c686c3f559015b50e855fed3db...
Contribute to andrewdwallo/filament-companies development by creating an account on GitHub.
You might have to download in order to understand but idk... its up to you
Again I appreciate it and just let me know
Just so I’m following, getActions is where you’re trying to execute this?
Its where the
is in the create action, right after create it instantly opens a custom modal in the corresponding blade view to show the api token
Yea. That’s where I was looking just wanted to make sure I was focusing on the right thing. Will let you know.
Doesn't have to be right this instant, I'm on your time. Your the one doing me a favor here, thanks again
Won’t be this instant. I’m in Friday Jameson mode. But will look more tomorrow. 😂
Whatever gets the job done hahaha