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.

Require User to be [Role]

  1. I want to allow only logged in users of a certain role/capability to use a form. There is already "Require user to be logged in". I was hoping there might be something as simple as a filter I can hook to.

    Any ideas? I know I can do it a trickier way, I was hoping to do it real smooth like, without a whole bunch of shortcode logic.

    Posted 11 years ago on Tuesday June 18, 2013 | Permalink
  2. What if you used this: http://gravitywiz.com/dynamically-populating-user-role/

    And then relied on conditional logic to show/hide fields/submit button, etc

    You could put all of your form fields under a section break and apply conditional logic to that section break to show or hide and then you could add an HTML field that shows via conditional logic if they don't have rights to use the form.

    Posted 11 years ago on Wednesday June 19, 2013 | Permalink
  3. That's some pretty sharp thinking there. Thanks, that does the trick.

    Next, to write a registration form that also allows for "upgrading" the user role. This same logic should do it.

    Posted 11 years ago on Thursday June 27, 2013 | Permalink

This topic has been resolved and has been closed to new replies.