WP Survey And Quiz Tool
[resolved] Additional custom field for PDF certification (3 posts)

  1. Contemplative Computing
    Posted 3 years ago #

    Hi guys,

    I'm wondering if anybody knows how to add an extra shortcode variable to the PDF output. I need my certification PDFs to display quiz-taker's license numbers, which I can add as a required field in their profile through another plugin. I just don't know quite how to pull this field into the PDF output.

    I found shortcode.php and see where I'd add the new shortcode, I just don't know quite enough about php/mysql to work this out on my own.

    Any thoughts?



  2. Backie
    Posted 3 years ago #

    function filter_add_token($objTokens) {
       $objTokens->addToken ( 'tokenName', 'description of the token, this will appear in the token list on the admin dashboard where listed', 'tokenValue' );
    // if you don't know the value at the set process which is done early and often so might not be wise to do the logic each time the list is generated.
    function filter_token_values($objTokens) {
       $objTokens->setTokenValue('tokenName', 'tokenValue');

    Some code like that above. Do that in your own plugin file so that any updates won't break your install.

  3. Contemplative Computing
    Posted 3 years ago #

    Thanks! Figured it out on my own using pretty much exactly what you described.

    Very happy with the cimy extra field plugin, which has great documentation about how to pull the value for its additional fields.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Survey And Quiz Tool
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic