Advertisement
Guest User

Untitled

a guest
May 27th, 2019
387
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. add_filter("gform_pre_render", "populate_custom_html");
  2.  
  3. function populate_custom_html($form) {
  4.   //Calling the correct form
  5.   if ($form["id"] != 1) {
  6.     return $form;
  7.   }
  8.  
  9.   //Mofidying the HTML field
  10.   foreach ($form["fields"] as &$field)
  11.   if ($field["id"] == 19) {
  12.     $field["content"] = "Lots of companies in the ";
  13.   }
  14.   $input_industry = $field["id"] = 41;
  15.   $input_department = $field["id"] = 6;
  16.  
  17.   return $form;
  18.   }
Advertisement
RAW Paste Data Copied
Advertisement