SeanCrandall
New member
I know this is super basic, but I just don't know much about JavaScript. (I'm an old hand at C/C++ and I've taught myself some PHP, definitely not a seasoned web developer).
My application helps me manage my docket (I'm a patent attorney). I have a form that has "Cases" with a list of one or more Inventors linked to each Case. My database includes the inventor email addresses. I have a custom PHP function that takes a $case_id, and returns a link like <a href="mailto: [inventor_list]?subject=[subject]">Email Inventors</a>. This function works great on my custom dashboard, which shows me items currently due.
I want to add a custom button to my Cases form, "Email Inventors," so I can auto-generate an email to the inventors if the case isn't currently on my dashboard. I have added the button, and I can use a PHP callback to get the link, but then I'm not sure what to do with it. I think what I need to do is use a JavaScript callback instead to open the link. But looking at the documentation, the JavaScript callback doesn't seem to get the $case_id like the PHP callback.
Again, I am a total moron with JavaScripts, so maybe I'm missing something obvious. Is there a way for the JavaScript callback to get the $case_id, call the PHP function that returns the link, and then open the link?
You are using DaDaBIK version 11.9-Elba enterprise, installed on 05-15-2023 (installation code: 1811062e2f139af96e), the latest version of DaDaBIK is 11.9-Elba released on 03-23-2023
You are running the latest release of DaDaBIK
In case you want to upgrade to a more powerful edition (from Pro to Enterprise/Platinum, from Enterprise to Platinum) please contact us.
PHP Version: 8.1.19
mysql version: 10.8.8-MariaDB-1:10.8.8+maria~ubu2204
Web server: Apache/2.4.56 (Debian)
Client: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/113.0
My application helps me manage my docket (I'm a patent attorney). I have a form that has "Cases" with a list of one or more Inventors linked to each Case. My database includes the inventor email addresses. I have a custom PHP function that takes a $case_id, and returns a link like <a href="mailto: [inventor_list]?subject=[subject]">Email Inventors</a>. This function works great on my custom dashboard, which shows me items currently due.
I want to add a custom button to my Cases form, "Email Inventors," so I can auto-generate an email to the inventors if the case isn't currently on my dashboard. I have added the button, and I can use a PHP callback to get the link, but then I'm not sure what to do with it. I think what I need to do is use a JavaScript callback instead to open the link. But looking at the documentation, the JavaScript callback doesn't seem to get the $case_id like the PHP callback.
Again, I am a total moron with JavaScripts, so maybe I'm missing something obvious. Is there a way for the JavaScript callback to get the $case_id, call the PHP function that returns the link, and then open the link?
Your current DaDaBIK version
You are using DaDaBIK version 11.9-Elba enterprise, installed on 05-15-2023 (installation code: 1811062e2f139af96e), the latest version of DaDaBIK is 11.9-Elba released on 03-23-2023
You are running the latest release of DaDaBIK
In case you want to upgrade to a more powerful edition (from Pro to Enterprise/Platinum, from Enterprise to Platinum) please contact us.
System info
PHP Version: 8.1.19
mysql version: 10.8.8-MariaDB-1:10.8.8+maria~ubu2204
Web server: Apache/2.4.56 (Debian)
Client: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/113.0