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.

Gravity forms post data hook and very weird behaviour depending on user level

  1. RichardBest
    Member

    Hi Guys

    I'm pulling my hair out here and am hoping someone can help please.

    I'm using Gravity Forms to produce reports, the content of which depends on a user's form inputs. To access the form, a person must be registered and logged in (by default, upon registration, a user has Subscriber status).

    One of the multiple php files that helps generate the output reports is as follows:

    http://www.pastie.org/2139096

    The problem I'm having appears to be caused by post submission access controls or, in other words, user rights. When I'm logged in as admin, fill in the form and receive a resultant report (in the form of a post), I get this code:

    http://www.pastie.org/2139104

    As you can see, this code contains the xml namespace declarations in the php template set out above.

    By contrast, when I ran a report logged in as an ordinary user (with the Subscriber level), I get this code:

    http://www.pastie.org/2139108

    As you can see, the xml namespace declarations are missing.

    I figured out by trial and error that the minimum access level for a user that will preserve the xml namespace declarations is Editor.

    I have no idea why this is so but my site won't work properly unless I can enable the xml namespace declarations to appear for a user below Editor level.

    I don't know whether this is a Gravity Forms issue. If it is, can someone please, please help? Will pay a bit if that helps.

    Posted 13 years ago on Wednesday June 29, 2011 | Permalink
  2. RichardBest
    Member

    Hi again all. After hours of cogitation, the problem is now solved. The cause is that only Admins and Editors have an "unfiltered_html" capability. The solution was to use Justin Tadlock's excellent Members plugin to add that capability to the Subscriber level.

    Apologies for the false alarm.

    Posted 13 years ago on Wednesday June 29, 2011 | Permalink