Advertisement
Guest User

Untitled

a guest
Apr 21st, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. <?php
  2. /*
  3. Dynamically populates the first column of a Gravity Form multi-column list field
  4.  
  5. REQUIREMENTS
  6. (1) The end of the the `gform_field_value_$parameter_name` filter must match the parameter you've set to allow field to be populated dynamically
  7. (2) The key in each row's array element must match the header you have set for the column.
  8. */
  9.  
  10. add_filter( 'gform_field_value_certifications', 'typewheel_prefill_certifications_list' );
  11. function typewheel_prefill_certifications_list( $value ) {
  12. $list_array = array(
  13. array(
  14. "Certificate / License" => "Aquatics or Waterfront",
  15. ),
  16. array(
  17. "Certificate / License" => "Medical",
  18. ),
  19. array(
  20. "Certificate / License" => "Horsemanship",
  21. ),
  22. array(
  23. "Certificate / License" => "Wilderness",
  24. ),
  25. array(
  26. "Certificate / License" => "Food Service",
  27. ),
  28. array(
  29. "Certificate / License" => "",
  30. ),
  31.  
  32. );
  33. return $list_array;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement