daily pastebin goal
3%
SHARE
TWEET

Untitled

a guest Dec 11th, 2017 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. // update '1' to the ID of your form
  4. add_filter('gform_pre_render_1', 'add_readonly_script');
  5. function add_readonly_script($form){
  6.     ?>
  7.    
  8.     <script type="text/javascript">
  9.         jQuery(document).ready(function(){
  10.             jQuery("li.gf_readonly textarea").attr("readonly","readonly");
  11.         });
  12.     </script>
  13.    
  14.     <?php
  15.     return $form;
  16. }
RAW Paste Data
Top