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 Help

  1. sandman18
    Member

    I am trying isolate a group of my forms selectors eg. section title, input container, dropdown box, for custom css styling. I am trying to change the background color and/or put a border around a particular group in my form and repeat for other sections. Any suggestions?

    Posted 13 years ago on Thursday January 13, 2011 | Permalink
  2. This post might be helpful to you:

    http://forum.gravityhelp.com/topic/wizard-plugin-for-gravity-forms#post-6191

    There have been a few adjustments to the code provided there, so I would recommend using this instead:

    http://pastie.org/1456139

    This is a jQuery solution that basically restructures your form on page load and puts everything into tidy fieldsets. Keep in mind, this is possible to do using the GF HTML fields; however, I've found that method for adding sections can get confusing and a little cumbersome.

    This will allow you to style sections like this: http://www.afineartprint.com/your-files/

    To style the fieldsets you can do something like this:

    <style type="text/css">
    fieldset.gsection-container { border: 1px dotted #ccc; margin: 10px; padding: 10px; }
    </style>
    Posted 13 years ago on Thursday January 13, 2011 | Permalink
  3. sandman18
    Member

    Thanks. Do I need to download the wizard plugin as well or can I just use the code you provided on pastie.org? Your example is exactly what I am looking to do!

    Posted 13 years ago on Thursday January 13, 2011 | Permalink
  4. You should just need the snippet from pastie.org. You'll want to put it in a javascript file and make sure that javascript file is being called in the <head> of your page.

    Posted 13 years ago on Thursday January 13, 2011 | Permalink
  5. sandman18
    Member

    Ok. I'm using headway for my theme editor. I am calling the script in my head. when i view my page source it is calling under the jquery file. I entered the css in the live css editor and nothing is happening on the page. Do I need to do anything else?

    Posted 13 years ago on Thursday January 13, 2011 | Permalink
  6. Can you post a link to your form?

    Posted 13 years ago on Thursday January 13, 2011 | Permalink
  7. sandman18
    Member

    http://utilityforyouth.com/new/

    Posted 13 years ago on Thursday January 13, 2011 | Permalink
  8. Ah, sorry Sandman. I did neglect to mention that you need to wrap your shortcode in a div with a special class so the script knows to run.

    <div class="add-gf-sections">[gform id=9]</div>

    Just an example, but hopefully that makes sense.

    Posted 13 years ago on Thursday January 13, 2011 | Permalink
  9. sandman18
    Member

    I saw that from your previous post and tried wrapping the shortcode in the div tag with the class you specified. I am still not seeing anything though.

    Posted 13 years ago on Thursday January 13, 2011 | Permalink
  10. sandman18
    Member

    Do you think I need to be more specific with the css?

    Posted 13 years ago on Thursday January 13, 2011 | Permalink
  11. Two things I noticed:

    1 - You've got a javascript error on the page which could be interefering with the GF sections script.

    2 - I'm not seeing the "<div class="gf-add-sections"></div>" in the page source of the link you shared.

    Posted 13 years ago on Thursday January 13, 2011 | Permalink
  12. sandman18
    Member

    Ok. I am not sure what javascript errors you are referring to, how do I see them? I did move some javascript calls to the head were I had them in the body. I also realized that I was using Headways Gravity forms plugin to load the form so I was not surrounding the form properly. It should be in the div tag now, but I am still not seeing the sections?

    Posted 13 years ago on Friday January 14, 2011 | Permalink
  13. The sections are there, but they will not be "visible" unless styled to be so.

    fieldset.gsection-container {
      background-color: #FFFFFF;
      margin: 10px;
      padding: 10px;
    }

    Add that to your style sheet. The sections should now show up with white backgrounds like this: http://grab.by/8nKv From there you can style away to get them looking how you want. :)

    Posted 13 years ago on Friday January 14, 2011 | Permalink
  14. sandman18
    Member

    Genius!! It works. Thank you so much for the help and hand holding!! One more question. What is the program you use to check your code and see if the javascript is not working? Thanks Again!

    Posted 13 years ago on Friday January 14, 2011 | Permalink
  15. Most web browsers come with some sort of default error console. If you're using Firefox (like me) it'd be under "Tools": http://grab.by/8nU4

    In addition, for more advanced troubleshooting and debugging I use Firebug, which amongst other things will let you step through the JS code, line by line. :)

    Posted 13 years ago on Friday January 14, 2011 | Permalink
  16. sandman18
    Member

    One more question. If you take a look at the form at the bottom of the page I have a checkbox that is showing up twice. I only put it in the form once. This wasn't happening before. Any idea what is going on?

    Posted 13 years ago on Saturday January 15, 2011 | Permalink
  17. @sandman18 I would suggest deleting the I accept these terms checkbox from your form, save your form, and then re-add the I accept these terms checkbox. It looks like your form data for that checkbox is out of synch. Re-adding it should solve the issue.

    Posted 13 years ago on Saturday January 15, 2011 | Permalink
  18. sandman18
    Member

    Hi Carl, I tried that and it did not work. Even after re-adding the checkbox it still shows up twice. It seems like it is only happening to the check boxes. I put another one in a different section and the choices are repeating but not the title.

    Posted 13 years ago on Saturday January 15, 2011 | Permalink
  19. sandman18
    Member

    When I take the div tags off my shortcode the checkbox works normal. Maybe something in the javascript? Any thoughts.

    Posted 13 years ago on Saturday January 15, 2011 | Permalink
  20. Hi Sandman,

    Yeah, it probably is an issue with the javascript. This script is outside of standard scope but if you send me a login to my personal account I will troubleshoot the script as time allows. david@ounceoftalennt.com

    Posted 13 years ago on Saturday January 15, 2011 | Permalink
  21. sandman18
    Member

    Was there 1 n in the email or 2? I tried to send it but it was returned.

    Posted 13 years ago on Saturday January 15, 2011 | Permalink
  22. It was a typo. David's email is david@ounceoftalent.com. He's a super-talented programmer, but obviously not a spelling bee champion.

    Posted 13 years ago on Sunday January 16, 2011 | Permalink
  23. sandman18
    Member

    lol.

    Posted 13 years ago on Sunday January 16, 2011 | Permalink