Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Disable form fields to make read-only
- * To apply, add CSS class 'wpmonks-readonly' (no quotes) to field in form builder
- *
- */
- function wpmonks_disable_field() {
- ?>
- <script type="text/javascript">
- jQuery(function($) {
- $(".wpmonks-readonly input").attr("readonly", true);
- });
- </script>
- <?php
- }
- add_action( 'wpforms_wp_footer', 'wpmonks_disable_field' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement