Jump to content


Photo
- - - - -

Shortcode in TextBox - How to Set Background for Form only, Remove Extra lines

Shortcode Gravity Froms TextBox

  • Please log in to reply
2 replies to this topic

#1 balfred1345

balfred1345

    Super Member

  • Members

  • 101 posts
  • LocationFlyover Country, USA
  • Framework Version:Some sites Pagelines Framework (latest version), some sites DMS latest version
  • Country: Country Flag

Posted 04 March 2014 - 07:13 PM

Hi,

I'd like to be able to put a shortcode for Gravity Forms plus HTML in a Text Box to I can write media queries to call a smaller version of the Gravity Forms form for mobile. 

 

When I get this working, I'll want to use another textbox with different sizes of an image called by media queiries.

 

The problems I need help with:

1) How do I set the background-size of the form I've placed in the text box to match the size of the form fields. I tried using a class within html in the textbox to set background color, but it still effected the entire area of the text box, not just the background of the form. When I set background-size to smaller than auto or 100%, the form fields get reduced commensurately. Please see the form in the ORANGE full width section at http://whub34.webhos...oh6/cidev2.com/

 

2) I am getting extra blank lines (see under "Move Date" and under "Free Quote Now" button), and figure that they are getting thrown by the shortcode in a bad interaction with WP. Nonetheless, I need to know how to get rid of them. I understand that I can't use [pl_raw] in a text box. I know that [pl_raw] can be used in a page or post, but I don't know how to bring a particular new post or page into an existing page such as at the above url.

 

Thanks!

 

-Bruce



#2 balfred1345

balfred1345

    Super Member

  • Members

  • 101 posts
  • LocationFlyover Country, USA
  • Framework Version:Some sites Pagelines Framework (latest version), some sites DMS latest version
  • Country: Country Flag

Posted 05 March 2014 - 12:28 AM

Updating above post:

I figured out how to deal with the background (number 1 above)

 

But, I still need help with number 2 above.

 

Thanks,

Bruce



#3 James B

James B

    Advocate

  • Members

  • 5126 posts
  • LocationSurrey - UK
  • Country: Country Flag

Posted 05 March 2014 - 01:28 AM

Hi Bruce

 

The form has a <p> tag which is adding the additional spacing on the move date etc.

 

Try adding the following to your custom css to remove

 

.gform_body p {
    margin: 0 !important;
}






Also tagged with one or more of these keywords: Shortcode, Gravity Froms, TextBox