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.

Can you ”kill” gform_wrapper?

  1. dansod
    Member

    Hi,

    I have a rather delicate problem:

    • I have created a simple form, just an input field and a Submit button, and styled the form as I like it with inline css like so:

    <form style="method="POST" name="spinnerform" action="http://nordicgreen.cag.se/sv/teckna-avtal"><input style="width:117px;text-align:center;font-size:12px;margin-top:145px;margin-left:48px" type="text" name="zipcode" value="Ditt postnummer" onblur="if(this.value.length == 0) this.value='Ditt postnummer';" onclick="if(this.value == 'Ditt postnummer') this.value='';" / maxlength="5" /><input style="font-size:15px;background-color:#e62f55;margin-top:10px;margin-left:48px;width:125px;height:40px" type="submit" value="Teckna avtal" /></form>

    • I then place this in an HTML-contenet placeholder in Gravity Forms and publish it, but I still get the wrapper ".gform_wrapper" around it, which I don't want there. I just want the form I created and nothing else.

    • Since I have other forms on my web site and I want the wrapper to be active there, I have to find some way to "kill" the ".gform_wrapper" for just the above form.

    Is there a way to, in the "forms.css" to do something like this: "Use my forms CSS only and omit the gform_wrapper altogether"?

    Sorry, I'm not too good at HTML so I don't know if this is possible or how to code this. Any help would be most appreciated.

    Regards

    Johan

    Posted 11 years ago on Thursday October 11, 2012 | Permalink
  2. Johan,

    I'm confused as to why you are trying to place this form function using Gravity Forms. Why not just keep it external altogether outside of Gravity Forms. I think there is a better solution here than what you are trying to do with Gravity Forms. Can you please explain what your overall goal is for this form in particular and also provide a link to the page it will be on for us so we can help you with what you are trying to do.

    What you are trying to do above is nesting two form objects, which is just bad/invalid HTML anyways.

    Posted 11 years ago on Thursday October 11, 2012 | Permalink
  3. dansod
    Member

    Hi,

    thanks for taking time to answer. The thing is that I have this HTML-animation plug-in for Wordpress. And it just doesn't accept forms as html (as my code above, for instance). But it does accept short codes! So, after trying to put the above code into the plug-in and fail, I decided to try Gravity Forms shortcode. It works, but the wrapper messes the form up. I would like for GF's to just "carry" my code and nothing else.

    Kind of a "one-of-a-kind-problem", I know. :-)

    Johan

    Posted 11 years ago on Thursday October 11, 2012 | Permalink
  4. I think what I don't understand is why don't you want the wrapper? Are you having difficulty styling it on it's own without interfering with other forms? Can you provide a link to your form with the way you don't want it, but works so we can take a look at what exactly is "messing up"?

    Posted 11 years ago on Thursday October 11, 2012 | Permalink
  5. dansod
    Member

    Hi,

    I have problems styling it since I have other forms on my website that uses the wrapper and where I want it to be "active". It's just this one form where I want to get rid of it. Since I'm not good at html I was hoping that someone might have an idea as to how to create a class or ID or something that would "cloak" the wrapper or comment it out altogether for this particular form. I do not know if this is possible at all, probably not.

    Here is a test page with the (not finished) animation. Here you see my form, the input field and the button, inside the wrapper (the white square with the dotted outline):

    http://nordicgreen.cag.se/fi/layerslider-test/

    Now you can see why I want to exclude the wrapper just for this form.

    Here is another page where I use the wrapper and want to keep it:

    http://nordicgreen.cag.se/fi/yritykset/pyyda-tarjous/

    Johan

    Posted 11 years ago on Friday October 12, 2012 | Permalink
  6. Johan,

    No problem. Each wrapper already has a unique ID. So you can use this to manipulate just this one (place into your theme's stylesheet):

    [css]
    #gform_wrapper_5 {
    background: none;
    outline-width: 0;
    padding: 0;
    margin: 0;
    border-radius: 0;
    }

    Using the above, you can now style it independently to your liking. Let me know if you get stuck or need anything else.

    Posted 11 years ago on Friday October 12, 2012 | Permalink
  7. dansod
    Member

    Oh boy, thanks a lot! It works like a charm! Many thanks for taking time to help me. Took a load off my shoulders, there. :-)

    http://nordicgreen.cag.se/fi/layerslider-test/

    Johan

    Posted 11 years ago on Friday October 12, 2012 | Permalink
  8. Awesome - looking good! Glad to help.

    Posted 11 years ago on Friday October 12, 2012 | Permalink

This topic has been resolved and has been closed to new replies.