Advertisement
Guest User

Untitled

a guest
Mar 21st, 2012
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. // Car Insurance Confirmation
  2. add_filter('gform_pre_render_3','populate_html'); //only populateing html for form id 3 - Car Insurance
  3.  
  4. function populate_html($form) {
  5.  
  6. foreach($form["fields"] as &$field) {
  7.  
  8. if($field['id'] == 91):
  9. $field['content'] = '<p>Please view your details and confirm your quotation by submitting the form</p>';
  10. $field['content'] .= '<ul>';
  11. foreach($form['fields'] as &$field){
  12.  
  13. $field['content'] .= '<li>';
  14. if($field['id']!=91) {
  15. $field['content'] .= $field['label'];
  16. }
  17. $field['content'] .= '</li>';
  18.  
  19. }
  20. $field['content'] .= '</ul>';
  21. endif;
  22. }
  23.  
  24. return $form;
  25.  
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement