davo Posted September 8, 2013 Share Posted September 8, 2013 have a set of pages that are child pages using a specific template. They contain event information. i want users to be able to add to these listings. So my question is probably based around concept as I've read about a couple of different ways to achieve this and I'd like to know which is the best route. The first is, I create a form in a template and simply use the api to submit this through creating the extra pages. I've given this a go and it does seem to work. Of course as has been pointed out in a number of other posts, features such as date picker wouldn't be available easily here, and I'm not sure about the format I'd have to put the time and date in for it to be added correctly. The other concept I've been playing with is doing something like this: <a class="fancybox" href="/processwire/page/add/?parent_id=1022&modal=1">add page</a> I get that and it seems to quite easily include all the features such as date picker etc, but that does of course mean a user would have to be logged in to open it. So, trying to make the user experience as simple as possible, I did think I could automatically log in a 'guest_user' on the same page, and then log them back out again. Or possibly just require a user registration and logging them in as that user, before sending them to that page. I'm just in a bit of a muddle as to which direction I should be taking this. Any help would be much appreciated. I'm very new to pw and quite please I've managed to get the display listings working using the api.. but it is a steep learning curve for me. Link to comment Share on other sites More sharing options...
Wanze Posted September 8, 2013 Share Posted September 8, 2013 Hi davo, What kind of users can add events? If you have editors that are creating the events for the website, I'd suggest to use the ProcessWire backend. It's really simple (clicking the "new" button under the events parent page). If your visitors (guest users) can post events, you could do it with a form in the frontend. It's straightforward - I'm sure if you give us some more informations there will be answers here with sample codes. As for the datepicker: You can use any Javascript date-picker in your frontend template. Depending on the complexity of the form, there's also the great FormBuilder module Cheers 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