Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. /**
  2. * Disable form fields to make read-only
  3. * To apply, add CSS class 'wpmonks-readonly' (no quotes) to field in form builder
  4. *
  5. */
  6. function wpmonks_disable_field() {
  7. ?>
  8. <script type="text/javascript">
  9.  
  10. jQuery(function($) {
  11. $(".wpmonks-readonly input").attr("readonly", true);
  12. });
  13.  
  14. </script>
  15. <?php
  16. }
  17. add_action( 'wpforms_wp_footer', 'wpmonks_disable_field' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement