maddmac Posted September 9, 2020 Share Posted September 9, 2020 Is is possible to pass JavaScript to a Hook? Looking to pass a value from a form select into a hook prior to the form being submitted. I realize the hook can be added when the form is processed but this is for a page lookup $wire->addHookAfter('InputfieldPage::getSelectablePages', function($event) { if($event->object->name == 'your_field_name') { $event->return = $event->pages->find('your selector here'); } }); Link to comment Share on other sites More sharing options...
kongondo Posted September 9, 2020 Share Posted September 9, 2020 Moderator Note @maddmac I split your question into its own topic as it was not related to the thread where it was (Captain Hook). 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now