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.

pagebreak for non-members

  1. twessel
    Member

    Is it possible to create a <!--pagebreak--> so that only non-members get it. Another-words, members will see a full page and non-members will get page breaks? Would that be done in GF or within WP itself? Thanks so much!

    Posted 12 years ago on Saturday August 25, 2012 | Permalink
  2. I think I would create two forms. Create your first form without page breaks, then duplicate the form, and add the page breaks. Embed the first form in a page and make it so only registered and logged in users see that form. In the alternate content for the form, the message that non-logged in users see, insert the shortcode to the form with page breaks. Would that work?

    Posted 12 years ago on Saturday August 25, 2012 | Permalink
  3. twessel
    Member

    Is it possible to add custom PHP code to a form or in the content template? I'm sure I could do some conditional logic if that was possible. Thanks!

    Posted 12 years ago on Thursday September 6, 2012 | Permalink
  4. PHP will not be processed in the content template or form. However, shortcodes are processed in both places. Maybe you could write your function and convert it to a shortcode, then use that shortcode to break the page for non-members.

    Posted 12 years ago on Thursday September 6, 2012 | Permalink
  5. twessel
    Member

    And that would render the submitted post with the conditional logic function sayings...

    If memeber, show full post, else break the pages?

    Posted 12 years ago on Thursday September 6, 2012 | Permalink
  6. If your function is written to do that, then yes. I am just saying you can't use PHP in the content template or in the form. But you can use a shortcode. If the shortcode executes the proper PHP or JavaScript, then yes, it would work.

    I wonder if you could add a section break and add the conditional logic to it, and set it to a condition which would never be true. That way, the section would always be hidden. Then you could write your function such that if the visitor is logged in, you run jQuery to show the section.

    Posted 12 years ago on Thursday September 6, 2012 | Permalink