access permission question

I want the submitted form to be public, but only logged in users to add/edit.

So far: I set the forms' default to logged in, added the access drop down, set that to hidden and defaulted it to "Public" or "ACCESS_PUBLIC". 

I went in and set the access on the existing forms, and still can't see them. Thanks is advance for any guidance to making this work.

  • That should be the actual value of ACCESS_PUBLIC, which is 2. Is that what you are using as the default?

  • I had just figured out the 2 part, but don't need it now. It's working the way I wanted it too.

    For some reason, the first time I tried setting the form to public, the public had write access.

    I think this may of been version .8b?

    I just set the form to public and now they don't have write access. But they can view the submitted forms. And, I don't need the access pulldown. 

     

    When I set the form to logged in and the access drop down to public/hidden/ACCESS_PUBLIC and set the existing forms as public in the menu. When I went to the view all link, I got an error on line 80 in start.php, 

     

  • I wanted the same, and probably have a similar problem. Has this been solved yet?

    • I created a form and set its access to logged in users
    • I created a serach definition and set its access to public
    • my default access level is public too
    • I created a link from the home page to /mod/form/search.php?sid=n
    For logged in users the search definition will appear fine.
    Public site visitors will get an error:
    Fatal error: Call to a member function getOwner() on a non-object in /mod/form/start.php on line 87
    Aparently I don't fully understand access control yet.
    Help appreciated!
  • The search definition needs to access the form, which it can't because the access is set to logged-in users. Basically, the search access cannot be less restrictive than the form itself.

    More generally, the custom form system was not designed to work with public access. That might change in the future depending upon the needs of the clients that fund its development.

  • ic... and if I made the forms public...

    Would it not be enouph to add gatekeeper() to /mod/form/form.php and /mod/form/actions/manage_form_data.php to prevent public users from adding/editting or deleting content? or is there other risks?

  • Mio, please try it and and see if it works for you.

  • it apears to work fine.

    Thanks.

Form and related plugins

Form and related plugins

User-generated content, flexible user and group profiles, registration forms, custom file forms