Hidden form field
-
Hi,
As there is no option for adding a hidden field in the plugin, I tried the following JS code snippet to create a class but it’s not working. Can anyone tell me why? I add the class, wpf-hidden-field, to the input field I want to hide
/** * Make standard form fields to make hidden * To apply, add CSS class 'wpf-hidden-field' (no quotes) to field in form builder * */ function wpf_dev_hidden_field() { ?> <script type="text/javascript"> jQuery(function($) { $( '.wpf-hidden-field input, .wpf-hidden-field textarea' ).attr({ display: "none" }); }); </script> <?php } add_action( 'wpforms_wp_footer_end', 'wpf_dev_hidden_field', 30 );
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Hidden form field’ is closed to new replies.