Advertisement
nrdgrl

Untitled

May 21st, 2012
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. <?php
  2.  
  3. add_filter('gform_pre_submission_filter_12', 'custom_redirect_url');
  4. function custom_redirect_url($form){
  5.  
  6. //$condition = RGForms::post('input_3');
  7. $condition = RGForms::post('input_7');
  8.  
  9. if(!$condition)
  10. return $form;
  11.  
  12. $form['confirmation']['type'] = 'redirect';
  13. switch($condition){
  14. case 'pdf2image':
  15. $form['confirmation']['url'] = 'http://www.visual-integrity.com/downloads/current-pdf2image.exe';
  16. break;
  17. case 'pdf2picture':
  18. $form['confirmation']['url'] = 'http://www.visual-integrity.com/downloads/current-pdf2picture.exe';
  19. break;
  20. case 'pdf2cad':
  21. $form['confirmation']['url'] = 'http://www.visual-integrity.com/downloads/current-pdf2cad.exe';
  22. break;
  23. case 'pdf2cadMac':
  24. $form['confirmation']['url'] = 'http://www.visual-integrity.com/downloads/pdf2cad_ext.pkg';
  25. break;
  26. case 'PDFFLY':
  27. $form['confirmation']['url'] = 'http://www.visual-integrity.com/downloads/current-pdffly.exe';
  28. break;
  29. case 'METAFLY':
  30. $form['confirmation']['url'] = 'http://www.visual-integrity.com/downloads/current-metafly.exe';
  31. break;
  32. }
  33.  
  34. return $form;
  35. }
  36.  
  37. function print_rr($array) {
  38. echo '<pre>';
  39. print_r($array);
  40. echo '</pre>';
  41. }
  42.  
  43. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement