daily pastebin goal
69%
SHARE
TWEET

Untitled

a guest Nov 24th, 2017 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /*
  3. Template Name: Form Manager Default
  4. Template Description: The default template for e-mail notifications and summaries
  5. Template Type: email, summary
  6.  
  7. //////////////////////////////////////////////////////////////////////////////////////////
  8.  
  9. Below are the functions that can be used within a summary template:
  10.  
  11. fm_summary_the_title() - the title of the form
  12. fm_summary_have_items() - works like have_posts() for wordpress themes.  Returns 'true' if there are more items left in the form.
  13. fm_summary_the_item() - works like the_item() for wordpress themes.  Initializes the current form item.
  14. fm_summary_the_label() - label of the current form item
  15. fm_summary_the_type() - type of the current form item (text, textarea, checkbox, custom_list, note, separator, recaptcha, file)
  16. fm_summary_has_data() - returns true if the form element is a data element (as opposed to a separator, note, etc.)
  17. fm_summary_the_value() - submitted value of the current form item
  18. fm_summary_the_timestamp() - timestamp for the current submission
  19. fm_summary_the_user() - the login name for the current user.  If no user is logged in, this returns an empty string.
  20. fm_summary_the_IP() - the IP address of the user who submitted the form.
  21. fm_summary_the_nickname() - the current item's nickname
  22.  
  23. fm_summary_get_item_label($nickname) - get an item's label by nickname
  24. fm_summary_get_item_value($nickname) - get an item's value by nickname
  25.  
  26. *NOTE: 'Summary' templates can also be used for e-mails.  Notice that under 'Template Type', both 'email' and 'summary' are listed.  If you want to make a template for e-mail notifications only, then you should only put 'email' under 'Template Type'.
  27.  
  28. //////////////////////////////////////////////////////////////////////////////////////////
  29.  
  30. */
  31. ?>
  32. <?php /* The title of the form */ ?>
  33.  
  34. <?php /* The user's first and last name, if there is a logged in user */ ?>
  35.  
  36. <?php /* The code below displays each form element, in order, along with the submitted data. */ ?>
  37. <ul id="fm-summary">
  38. <?php while(fm_summary_have_items()): fm_summary_the_item(); ?>
  39.     <?php if(fm_summary_the_type() == 'separator'): ?>
  40.         <hr />
  41.     <?php elseif(fm_summary_has_data()): ?>
  42.         <li<?php if(fm_summary_the_nickname() != "") echo " id=\"fm-item-".fm_summary_the_nickname()."\"";?>><?php echo fm_summary_the_label();?>: <strong><?php echo fm_summary_the_value();?></strong></li>
  43.     <?php endif; ?>
  44.  
  45. <?php endwhile; ?>
  46. </ul>
RAW Paste Data
Top