PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

1.4, wp_enqueue_style, hidden fields in admin

  1. Hey guys,

    not sure if this is specific to the new release, but i added
    wp_enqueue_style("gforms_css", WP_PLUGIN_URL . "/gravityforms/css/forms.css");

    which apparently also loads while in wp-admin... problem is
    /wp-content/plugins/gravityforms/css/forms.css?ver=3.0.1 line 176

    .gform_wrapper input[type="hidden"], .gform_wrapper input.gform_hidden, .gform_hidden {
    display:none; <----
    }

    this also snags a new hidden field in the form builder... had to turn off in firebug to edit the form
    - li class="selectable gfield gform_hidden" id="field_7"...... -/li

    Posted 14 years ago on Friday August 20, 2010 | Permalink
  2. You can prevent this from happening by adding code to prevent the enqueue from outputting on the admin end of things. We will add this to our instructions on enqueueing the scripts.

    See the following:

    http://codex.wordpress.org/Function_Reference/wp_enqueue_script#Load_a_script_from_your_theme.2C_excluding_admin_area

    Posted 14 years ago on Friday August 20, 2010 | Permalink
  3. Cool, thank you sir.

    Posted 14 years ago on Saturday August 28, 2010 | Permalink