I am starting to build a patient portal vertical market app to allow patients to complete certain forms online prior to their appointment. This will need to use the authentication process which I think I’ve got the hang of from your videos. I want to be able to brand this for each clinic. I’ve done this on a separate booking app so will be using the same approach to set the code for the colour etc and want to show the clinic’s logo above the login, registration etc forms.
I’ve got this working for the login page by adding a set of custom scoped hooks called BF - login. However when I go to my login/signup page $$BF_App is not populated with the logo url. I am guessing I do not need to add separate custom scoped hooks for BF - login/signup, BF - login/password etc and that there is a simpler way to achieve the desired result?
One common way to populate the global app scope is by using the
onAppLoad named action in your site settings. There you can run a hook and set $$BF_App in FileMaker with dynamic data (based on the domain, for example)
However, you do have to remember that the app scope ($$BF_App) is one-way only system. You can set stuff in FM and read in BF, but it does not pass back to FM on hook calls.
I think I’m being a bit dense, but what script does the onAppLoad Hook run in FileMaker?
It can run whatever script you want! Just add a “runUtilityHook” action to the array, and give it a hookSetName of “global” (or something similar). I create a new hook set called “global” in each of my apps for this purpose, since the onAppLoad could run in any page of your app and you can override the hookSetName using that extra key in the options.
This code goes in the Site Settings > Environment > Named Actions