bahamagician
Set State of Select Field After Dynamically Populating Via Dependent Field
Hey all,
I've been trying to solve this for two days and I'm sure it's something simple that I'm missing but I keep hitting a wall.
Using the code below, I'm populating the "service_call_id" field using an eloquent query based on the "customer_id" field.
However, once the "service_call_id" options have been populated, I'd like to automatically set the state of the "service_call_id" field to the very first result returned from the query. I've tried using default, selectablePlaceholder(false), and manually manipulating the state but I can't seem to find a way to hook into an event that happens after the options are populated. Any help would be GREATLY appreciated:
Using the code below, I'm populating the "service_call_id" field using an eloquent query based on the "customer_id" field.
However, once the "service_call_id" options have been populated, I'd like to automatically set the state of the "service_call_id" field to the very first result returned from the query. I've tried using default, selectablePlaceholder(false), and manually manipulating the state but I can't seem to find a way to hook into an event that happens after the options are populated. Any help would be GREATLY appreciated:
20 replies
How to Add Custom Action Buttons to RelationManager Modal
Normally when I want to add custom actions to a form, I'll use the getHeaderActions method in the pages directory. However, this doesn't exist for relation managers. Is there any way to add a custom action button to my relation manager form/page? In my case I want to attach a "send email" button to the form that opens up in the relation manager modal.
5 replies
Email Verification Problem
I'm having a problem with new users verifying their email. I have my app set up so that I can create new users and I'm using the "MustVerifyEmail" contract to send them a verification email when I've created them. However, I'm having a problem with the link they must click on to verify their email.
Below is the code for the route as per Laravel's docs. However, in my user model I have the canAccessPanel method set to only allow users that have verified their email. So when a user clicks on the link in the email and logs in, they get a 403 | Forbidden error.
I'm assuming that the canAccessPanel method is preventing an unverified email from verifying their email. Can anybody help me figure out how to get around this issue?
Below is the code for the route as per Laravel's docs. However, in my user model I have the canAccessPanel method set to only allow users that have verified their email. So when a user clicks on the link in the email and logs in, they get a 403 | Forbidden error.
I'm assuming that the canAccessPanel method is preventing an unverified email from verifying their email. Can anybody help me figure out how to get around this issue?
5 replies
Wire Model on Custom Field Class Variable
Maybe a silly question, but when I'm building a custom field, is there any way to use wire:model on a public variable from the custom field class? The input I'm using it on isn't the field I want to bind to the main field value. It's for additional functionality of searching an external API. Right now if I try to use wire:model on a public variable in the custom field class I get an error because it's looking for that variable on the pages.create class.
4 replies
Custom Field Event w/ Data?
Is it possible for a custom field to trigger an event along with some data to use in populating other fields. For example, I have a 'title" field that I'm building that will search the Shopify API for a product title, but once the user selects the title, I'd also like that custom field to send the price and sku for the product up to the "updated" closure or something similar so that I can fill the price and sku fields in the form. Is this possible?
8 replies