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.

CSS Styling on Name Field

  1. I can't figure out why "First" and "Last" aren't below the input boxes like the example has them. Help!

    http://kelicarender.net/#contact

    Posted 13 years ago on Tuesday February 15, 2011 | Permalink
  2. Because the Gravity Forms stylesheet isn't being output on the page.

    This would happen due to most likely one of 3 things..

    1) You have CSS output turned off on the Settings page of Gravity Forms

    2) Your theme does not have the necessary wp_head() function call in place in your header.php file and the necessary wp_footer() function call in place in your footer.php file. These are required for plugins to be able to output code in the header and footer of your site. Gravity Forms outputs the CSS in your header.

    To read more about these see the Codex articles here:

    http://codex.wordpress.org/Function_Reference/wp_head

    http://codex.wordpress.org/Function_Reference/wp_footer

    3) Possible theme or plugin conflict preventing Gravity Forms from outputting the necessary code in the header.

    Of these 3 possibilities the most likely issues are going to be #1 or #2 above.

    Posted 13 years ago on Tuesday February 15, 2011 | Permalink
  3. Hmm. Thanks, Carl. I guess it's #3 then. CSS Output is turned on, and wp_head() is in place in header.php and wp_footer() is in place in footer.php.

    Posted 13 years ago on Tuesday February 15, 2011 | Permalink
  4. I just looked again at this site, this isn't a standard implementation of the form. Or I should say how that theme is setup is not standard because it's outputting multiple pages worth of content on one page and using Javascript to scroll through them.

    The problem with this is it isn't using a standard loop, so the Gravity Forms shortcode is not able to enqueue CSS or Javascript because it's executed too late in the WordPress code execution process to be able to enqueue the necessary code.

    So the issue is this is a non-standard layout that the theme is using and how it is put together.

    Because of how this theme works you will have to enqueue the necessary Javascript manually. You will have to manually enqueue the CSS and Javascript by adding code to your functions.php file.

    See the last section of this documentation page where it discusses how to manually enqueue the CSS and Javascript:

    http://www.gravityhelp.com/documentation/embedding-a-form/

    This isn't typically necessary, however the theme you are using on this site does not follow standard WordPress conventions with how it is put together.

    Posted 13 years ago on Wednesday February 16, 2011 | Permalink
  5. Thanks, Carl. I added this piece to the functions.php, but it didn't make any changes:

    if(!is_admin()){

    wp_enqueue_script("gforms_ui_datepicker", plugins_url("gravityforms/js/jquery-ui/ui.datepicker.js"), array("jquery"), "1.3.9", true);

    wp_enqueue_script("gforms_datepicker", plugins_url("gravityforms/js/datepicker.js"), array("gforms_ui_datepicker"), "1.3.9", true);

    wp_enqueue_script("gforms_conditional_logic_lib", plugins_url("gravityforms/js/conditional_logic.js"), array("gforms_ui_datepicker"), "1.3.9", true);

    wp_enqueue_style("gforms_css", plugins_url("gravityforms/css/forms.css"));
    }

    Posted 13 years ago on Wednesday February 16, 2011 | Permalink
  6. If the code above was properly added it would be outputting that CSS and Javascript on every single page within the head. I don't see it being output in your HTML. So either the code wasn't added to your functions.php properly OR something else is going on with this theme. As I mentioned, the way this theme is put together is very non-standard and doesn't follow typical WordPress theming best practices.

    We can take a look and see what is going on, but it would require us to have access to this site in order to look at the theme code and see what is going on. In order to do this we would need a WordPress Admin login and FTP access so we can edit the theme files directly. You can send this information to us via our Contact Us form and reference this forum post and we can take al ook and see whats going on.

    Posted 13 years ago on Wednesday February 16, 2011 | Permalink
  7. Okay, Carl,
    The last thing I did actually DID work. I just had to wait for the cache to catch up. Great, it's calling the style sheet now.
    Thanks!

    Posted 13 years ago on Wednesday February 16, 2011 | Permalink
  8. Good to hear. You may have to do things slightly different with that theme due to how it works. It doesn't use a traditional loop to display that information, which is why the scripts are not automatically enqueued. This isn't typically an issue with most themes. Glad you got it working.

    Posted 13 years ago on Wednesday February 16, 2011 | Permalink