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.

Using a form in post/page content

  1. I'd like to use a form with post/page content where the content floats around the form. I think this can be done by using a custom class and some CSS, but I may want to use the same form on its own without the post/page content floating, or in a sidebar. Any custom class I add would apply to all instances of the form. Is it possible to add a custom class via a shortcode parameter or some other means? Is there any other way to control when the custom class is applied so that I don't have to have 2 forms for every situation where I want this control?

    Posted 7 years ago on Thursday January 10, 2013 | Permalink
  2. I would apply the custom CSS class to the form. Then, in your stylesheet, make sure you target the form with the custom CSS class only when it's in a page, or in a sidebar. So, your rules might look like this:

    [css]
    body .page-id-6371 .gform_wrapper {
      /* custom CSS rules here */
    }
    
    /* or */
    body .sidebar .gform_widget {
      /* custom CSS rules here */
    }

    Basically, find something that is unique to the page so you can make your rules specific enough to target them just where you want the styles applied.

    Posted 7 years ago on Thursday January 10, 2013 | Permalink