How to open CreateAction popup on page load #15447
Unanswered
manojcuritics
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Package
Panel builder
Package Version
v3.2
How can we help you?
I have table in a relationship manager file. In that table there is a button(on UI) by clicking this button a popup open up. I want to open this popup on page load I don't want to click this button. below the the code of the CreateAction. This is only piece of code from headerActions of the table.
CreateAction::make('newEncounter')
->authorize(true)
->label('Document Visit')
->modalHeading('Document Annual Wellness Visit')
->createAnother(false)
->slideOver()
->visible(function () {
$ownerRecord = $this->getOwnerRecord();
$currentYear = now()->year;
dd(!$ownerRecord->awvs()->whereYear('date_of_service', $currentYear)->exists() && auth()->user()->can('create_encounter'));
Please let me know if any other info is needed.
Beta Was this translation helpful? Give feedback.
All reactions