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.

DIV styling dissapears when GF creates draft post

  1. I'm using GF to allow users to create a draft post. I have a "post body" field with "Create content template" checked. In the content template, i added a div tag to style some bookmark links like this:

    '<div style="line-height: 170%; background: url('http://warbirds-eaa.net/wp-content/uploads/2012/04/nav-gradient-blu.jpg'); text-align: center; border-radius: 5px; font-size: 30px; font-weight: bold;">History</div>'

    The issue is:
    1. If I am logged in to WP as an admin, the content template creates the '<div>' with all the styling exactly as listed above. (This is how it should work)

    2. If I log out, the GF draft post strips all the styling out and I get this: '<div>History</div>.'

    The form is publicly available and I would like the styling to stay in place without a user having to signup or log in.

    Thanks,

    Franco

    Posted 13 years ago on Friday April 20, 2012 | Permalink
  2. Do you have a link to one of these posts?

    Posted 13 years ago on Friday April 20, 2012 | Permalink
  3. Sure:

    http://warbirds-eaa.net/bills-f4u/

    Posted 13 years ago on Friday April 20, 2012 | Permalink
  4. Is this what it's supposed to look like?

    Screenshot

    And if so, are you saying the only way you can get this to look this way is if you, as an admin are logged in, and fill out the form? Meaning, If I were to fill out the form now, my post would not have this look?

    Posted 13 years ago on Friday April 20, 2012 | Permalink
  5. Yes, that is what it is supposed to look like. If you added an entry, it would strip the 'style' tag completely out of the '<div>'. You end up with a plain link.

    I just added a new entry while logged out. This is what it looks like with the error:

    http://warbirds-eaa.net/test-gf-entry

    Posted 13 years ago on Friday April 20, 2012 | Permalink
  6. Have you tested for theme/plugin conflicts yet to see if there is something there causing this?

    http://www.gravityhelp.com/documentation/page/Testing_for_a_Theme/Plugin_Conflict

    To my knowledge we don't check for level-access on the post body content.

    Posted 13 years ago on Friday April 20, 2012 | Permalink
  7. Will do.

    Posted 13 years ago on Friday April 20, 2012 | Permalink
  8. OK...I tested both recommendations. I used the twenty ten theme. The issue was still there. Then I deactivated all the plugins and tested again. No luck.

    The only thing I can think of is that I added the "Member" plug in, and the subscriber role was changed somehow. I think that plug in leaves some settings in place even if you de-activate.

    Here's the current settings for subscriber type. However, I'm not sure if a generic user that's not logged in or a subscriber even gets these permissions.

    Subscriber current settings screenshot:
    http://warbirds-eaa.net/wp-content/uploads/2012/04/roles.jpg

    Any other ideas?

    Posted 13 years ago on Friday April 20, 2012 | Permalink
  9. Can you export the form and send the XML file to me so I can do some local testing with it and reference this post in your email.

    rob@rocketgenius.com

    Posted 13 years ago on Friday April 20, 2012 | Permalink
  10. Yes thanks Rob.

    Posted 13 years ago on Friday April 20, 2012 | Permalink
  11. Instead of using inline styles there, use classes - those retain, as I just tested it locally. Plus, that's just good practice anyways, especially if you ever want to change the styling of those buttons down the line. :)

    Posted 13 years ago on Friday April 20, 2012 | Permalink
  12. The problem is that I use WPtouch plugin. The posts will be read primarily by mobile devices via QR code, at airshows. When WP touch renders mobile CSS, it skips the classes. I was "forced" into in-line styling...not my choice, and point very well taken. ;)

    Posted 13 years ago on Friday April 20, 2012 | Permalink
  13. Wait..can I add a style in the post customer content area???

    Posted 13 years ago on Friday April 20, 2012 | Permalink
  14. Interesting, why does that skip classes? What do you mean by add a style in the post customer content area?

    Posted 13 years ago on Friday April 20, 2012 | Permalink
  15. I can only assume that WPTouch replaces the class import with it's own css style, to render the mobile stylesheet.

    My style question was, can I add a '<style>' tag in the post field content template, where I have all the fields I want in the post. I meant "Custom" not "customer" - apologies.

    -F

    Posted 13 years ago on Friday April 20, 2012 | Permalink
  16. Worth of a shot, if nothing else you could drop the style block in an HTML field even. Or, maybe you can take that static content and try to create something at your theme level that has all of that info contained outside of the post?

    Posted 13 years ago on Friday April 20, 2012 | Permalink
  17. I'll try the html block first. I'm pretty sure WPTouch will override anything I put at the theme level. I'll let you know.

    Posted 13 years ago on Friday April 20, 2012 | Permalink
  18. html block does nothing in WP post. Do you have any documentation on how to use the HTML block GF field?

    Posted 13 years ago on Friday April 20, 2012 | Permalink
  19. Ah right, forgot that this is going to a post. My bad on that one. Did you try your style block in the content template area or you could always use a custom field in the post fields section.

    http://www.gravityhelp.com/documentation/page/Post_Custom_Field

    Posted 13 years ago on Saturday April 21, 2012 | Permalink