- 🇵🇰Pakistan Allahnoor Turab
For me it is not working with drupal version 9.5.2 and fillpdf version 5.0
I not see any output.
I want this hook to remove prefix and change date format for some fields
/**
* Implements hook_fillpdf_merge_fields_alter().
*/
function miscellaneous_fillpdf_merge_fields_alter(&$fields, $context) {
dump($fields);
// $submission = end($webforms); // Gets the last sid passed.
// $ticket_price = 5.00; // @todo: Replace with code to get this from the webform object.
// $fields['The rent is'] *= $ticket_price; // Multiply number of guests by ticket price.
} - 🇨🇦Canada Liam Morland Ontario, CA 🇨🇦
I thought
dump()
was a Twig function. It won't work in a hook implementation. Ifdevel
module is enabled, you should be able to usedpm()
. - 🇵🇰Pakistan Allahnoor Turab
No success, actually the hook is not triggering.
- 🇨🇦Canada Liam Morland Ontario, CA 🇨🇦
hook_fillpdf_merge_fields_alter()
only exists in Drupal 7.