Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Dynamically populates the first column of a Gravity Form multi-column list field
- REQUIREMENTS
- (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
- (2) The key in each row's array element must match the header you have set for the column.
- */
- add_filter( 'gform_field_value_certifications', 'typewheel_prefill_certifications_list' );
- function typewheel_prefill_certifications_list( $value ) {
- $list_array = array(
- array(
- "Certificate / License" => "Aquatics or Waterfront",
- ),
- array(
- "Certificate / License" => "Medical",
- ),
- array(
- "Certificate / License" => "Horsemanship",
- ),
- array(
- "Certificate / License" => "Wilderness",
- ),
- array(
- "Certificate / License" => "Food Service",
- ),
- array(
- "Certificate / License" => "",
- ),
- );
- return $list_array;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement