Search results

  1. J

    calculated function

    This sounds like a situation where the calculated field is best populated using hooks. You could set your calculated field instead to a text field, then use an [after][insert] hook to define it initially, and an [update][after] hook called bu the separate table (table2) to update it.
  2. J

    Declare custom global variable

    Thanks Eugenio. In this case I have several custom php scripts that process a query to a different db schema than the one dadabik is using. I was hoping to store the connect parameters in a single place rather than repeat them in each script. js
  3. J

    Declare custom global variable

    Eugenio, I would like to have a custom variable available for use in my custom php scripts, say $dadabik_james_custom_variable. Is there a place that I could declare this (e.g., config.php)? My initial tests suggest it is not that simple, but I thought I would check. js -- DaDaBIK version...
  4. J

    Custom button to call function to create pdf

    Thanks Eugenio. I have just been creating custom buttons to generate pdfs. It seems easier if I call a php script outside of dadabik using HEADER. On a separate note, I just discovered in 9.2-Monterosso enterprise that [insert][after] hooks do not function unless the primary key field is set to...
  5. J

    Custom button to call function to create pdf

    Eugenio, can require_once ./include/tcpdf/tcpdf_include.php (and by extension, ./include/tcpdf/config/tcpdf_config_alt.php) in a function without messing the dadabik 'version' of the tcpdf libraries? I noticed that you did not include these dependencies in the dadabik tcpdf package.
  6. J

    Custom button to call function to create pdf

    Is it possible to create a function called by a custom button that could select some data and create a pdf with tcpdf? I have been able to do this using a custom_php script but I would prefer to do it with a function in custom_functions.pdf. However, when I converted my (working) php into a...
  7. J

    update-after hook to track user who made last modification

    Thanks so much Eugenio. I was able to get everything working. I expanded the idea a bit to make the hook function for multiple tables (as long as the primary key has the same name, in this case `id`). For any users looking for a functional hook to do this, the working code is included below...
  8. J

    update-after hook to track user who made last modification

    Thanks very much Eugenio, that was part of the problem, but I am still encountering an error. Here's my 'modified' code: $hooks['sample_log']['update']['after'] = 'dadabik_update_username_sample_log'; function dadabik_update_username_sample_log($id) { global $conn, $current_user, $quote...
  9. J

    update-after hook to track user who made last modification

    I am trying to automatically update a field containing username of the user who most recently modified a record. To do this, I want to use an update-after hook. $hooks['sample_log']['update']['after'] = 'dadabik_update_username_sample_log'; function dadabik_update_username_sample_log($id) {...
  10. J

    custom button for pdf from template

    Make sure custom buttons are enable by setting $enable_custom_button_functions = 1 in include/config.php, then you need to set up a custom button following the instructions in include/custom_functions.php. In the example below, I passed the table name, $where_value, template name etc into the...
  11. J

    setting permissions to MY allows changing for all records

    Darren, I don't know if you solved this, but I ran into a similar problem that was easily resolved. In addition to all the points Eugenio mentioned to check, make sure you go to the Forms Configurator, select the table and field where you're storing ID_user, then in Field Type, select ID_user...
  12. J

    custom button for pdf from template

    Your solution works like a charm. Thanks!! js
  13. J

    custom button for pdf from template

    Thanks Eugenio, I was thinking the details page, but the results grid would also be useful. The reason this would be useful is that I have a few views that share a common id with some common tables, and I would like to create a button that could be located on a table detail page that would...
  14. J

    custom button for pdf from template

    Is there an easy way in DaDaBIK 9.2 Monterosso to create a custom button to generate a pdf based on one of the custom templates?
  15. J

    break characters <br> automatically inserted in results classic grid

    Thanks very much Eugenio, that solves the problem. James
  16. J

    break characters <br> automatically inserted in results classic grid

    Eugenio, a follow-up question. Where is the code that adds the <br> because I would like to add a couple   to indent the next line. Thanks again, James
  17. J

    break characters <br> automatically inserted in results classic grid

    Many thanks Eugenio, setting $word_wrap_col in config.php to 250 resolved the issue. James
  18. J

    break characters <br> automatically inserted in results classic grid

    Despite the manual setting of the 'Min width (in px) of the results grid column' variable in the Forms Configurator, some element of business logic word wraps the column content by inserting <br> characters to achieve a column width of 200 px. The second row of the example below shows...
  19. J

    width setting for select-single in edit/ details view

    Thanks for the suggestions Eugenio. I had already tried adding a long fake record but that didn't work. I also tried modifying the field type from int to varchar(25) to make an even longer string, but that didn't work either. However, setting the "User-friendly searchable" parameter to "no"...
  20. J

    width setting for select-single in edit/ details view

    You are using DaDaBIK version 8.1-Lerici enterprise, installed on 09-17-2017 (installation code: 11383574a49b956199), the latest version of DaDaBIK is 8.1-Lerici released on 09-05-2017 You are runnning the last release of DaDaBIK PHP Version: 5.5.9-1ubuntu4.21 mysql version...
Top