CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules »
  • Drupal Webform Integration »
  • Civicrm Contact Names Highlighted in PDF generated by Drupal Webform
Pages: [1]

Author Topic: Civicrm Contact Names Highlighted in PDF generated by Drupal Webform  (Read 524 times)

Pyrrhon Lawdruid

  • I’m new here
  • *
  • Posts: 2
  • Karma: 0
  • CiviCRM version: 4.4.6
  • CMS version: Drupal 7.31
  • MySQL version: 5.5.38
  • PHP version: 5.5.9
Civicrm Contact Names Highlighted in PDF generated by Drupal Webform
August 29, 2014, 07:20:33 pm
Thrilled with the capabilities of webform_civicrm (7.x-4.8), but I can't control the contact name output I'm generating with webform2pdf (7.x-4.x-dev). The address fields for Civicrm contacts generate just fine in the resulting PDF document (black type without no underlining or other text decoration) but the name fields for Civicrm individuals and organisations pass through to the PDF document with a blue font color and underlining as if they're links. (indeed, when I view the resulting PDF in a browser and mouse over the highlighted text, it's treated as a link but the click result is "web page not found".) I've tried to change this with inline styling on the "Generate PDF" heading in webform, but it's ignored when the PDF is generated by webform2pdf (but only on submission values for these fields, other inline styling is effective). Another problem that occurs only in the highlighted text for Civicrm name fields is comma's are converted to "&#039". 

Of course, I've no idea whether this is a webform issue or civicrm, but this issue seems to arise on the name fields for Civicrm contacts only. Using civicrm 4.4.6 and webform 7.x-4.0-rc6 in Drupal 7.31. Hoping someone can point me in the right direction. Thanks.

Pyrrhon Lawdruid

  • I’m new here
  • *
  • Posts: 2
  • Karma: 0
  • CiviCRM version: 4.4.6
  • CMS version: Drupal 7.31
  • MySQL version: 5.5.38
  • PHP version: 5.5.9
Re: Civicrm Contact Names Highlighted in PDF generated by Drupal Webform
August 30, 2014, 06:20:37 am
Figured out my error. I was populating the submitted form with "existing contact" name only and using that as the submission value (field key) on the PDF form. By using Civicrm to create a form field for the contact name (organization or individual) and then using that field key (as opposed to the existing contact field key) on the PDF form, the PDF populated as desired and expected, no change in font color, underlining or inability to deal with commas. So, I believe Civicrm and the webform modules are functioning as intended (and that I wasted a lot of time trying to see if there was a css change I should be making to my theme, civicrm, or webform).
My use case (for those who might go down a similar road) is the website user completes webform A, which submits to Civicrm. The user then goes to webform B and pulls the contact information from Civicrm that s/he created on webform A which is needed to complete webform B. Submission of webform B creates the desired PDF document. I purposely didn't use the contact name field on webform B because I it looked redundant on my form.

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Civicrm Contact Names Highlighted in PDF generated by Drupal Webform
August 30, 2014, 12:41:29 pm
Webform does permit outputting a field in different ways in different formats, but I'm not sure if it treats html and pdf differently. Ideally the webform_civicrm module would be able to distinguish the output type and format the field more appropriately for pdfs.
Try asking your question on the new CiviCRM help site.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules »
  • Drupal Webform Integration »
  • Civicrm Contact Names Highlighted in PDF generated by Drupal Webform

This forum was archived on 2017-11-26.