Anonymous user access to doc type

Since the built in /contact document type is broken I am trying to build a web form to do essentially the same thing. Everything works fine if you are logged in with a system user, but I get an error message after submit that you have to be logged in to see the lead. I tried to put on the web form to just redirect to /index after submission and the thank you, but that is not working. Instead after I submit, I see the thank you message briefly and then erpnext redirects me to the lead by updating the query string (e.g. ?name=LEAD-00006)

Is there a way to alter the permissions on the lead document type to allow a few fields to be read by a non-logged in user (e.g. anonymous)?

Or better yet, can someone help me understand how to stop the redirect to the lead generated and just do what i put in the form, go to /index (home page) when done.

1 Like

You can set permission as guest to read.
Raise a github issue for the broken contact form. we will fix it !

The contact form issue is frappe #2222. I’ll look into the permissions for guest. thanks

I tried the guest permissions trick and am still getting the error. Here is a screen shot of the role permission

When I go to the site, not logged in and fill in the form I still get the error message:

What is interesting is the lead is created just fine, so the issue is just with the guest not getting the error. not sure where the fish icon came from, but its kinda cute:)

Thoughts on what I am doing wrong?

Thanks

Also getting same error here. I have created a new doctype and webform. After submission of webform, it redirects to the entered record. The problem is the user is not a registered user, and so not permission to view the record. Can it just stay on the Sucess message without redirecting?

Thanks for confirming. I was beginning to think it was just me. I get exact same behavior. The redirect to the record happens if you put a success message on the web form or not and also happens if you force a redirect to another page. A double redirect happens there. At this point I am thinking this is a defect for frappe.

https://github.com/frappe/frappe/issues/2266