ziu Posted November 9, 2017 Share Posted November 9, 2017 I have created a website that has a login and register feature. i used ryan's login register module. but now i want the logged-in user to add a page e.g. Add Property this page will have custom fields which logged in user will fill. but user can add only single. and he/she can update/edit this page only. I need your help guys in achiveing this. Thanks in advance. Any help will be appreciated. Link to comment Share on other sites More sharing options...
DaveP Posted November 9, 2017 Share Posted November 9, 2017 Easy. See Then have a field in that page for owner, which is the user's $user->id, add ?edit=true to the url (in a link from a user page or whatever) then in the page template something like <?php namespace ProcessWire; // Code to display page contents to guests if($input->get->edit && ($page->owner != $user->id)){ echo 'You are not authorised to edit this page.'; } else { // Your code (edit form etc) here } Very rough, but you should get the gist. If you get stuck, come back here and ask. 2 1 Link to comment Share on other sites More sharing options...
ziu Posted November 12, 2017 Author Share Posted November 12, 2017 Thank you dave i will try follow your steps , and will update about my progress. thank you really thank u Link to comment Share on other sites More sharing options...
ziu Posted November 12, 2017 Author Share Posted November 12, 2017 Hi dave, i attached an image , which describes what exactly i want to achieve. after user fills that property page, this page will add as a sub page under All Properties page as children. but one thing to note that one user can submit only one property at a time, hence he has permission to edit and save that page only. It will be big help for me, if you can guide me to perform this operation. as i am searching forum since last 10 days to achieve this and still not getting it. thank you Link to comment Share on other sites More sharing options...
kongondo Posted November 13, 2017 Share Posted November 13, 2017 Moderator Note 20 hours ago, ziu said: It will be big help for me, if you can guide me to perform this operation. as i am searching forum since last 10 days to achieve this and still not getting it. @ziu, Please do not start several topics about the same issue. I have deleted your other thread. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now