Jump to content

Questions Regarding Ajax (Again)


louisstephens
 Share

Recommended Posts

So I was going to build a todo tracking app for myself to test/broaden my knowledge of processwire, and so far it has been taxing ?.  My Site structure is:

- Project One
    - Phase One
        - Task
        - Task
        - Task
    - Phase Two
        - Task
        - Task
        - Task

So far it was pretty easy, I can easily foreach through the Project and get the phases with their tasks. However, it gets a bit muddled when I have more than one project as I was trying to have a dashboard where the content switches out to the selected project as opposed to accessing each project via their own url. How would yall handle this?

My next hurdle is each task has a select field (for project status) that I want to update via ajax (for the smooth transitioning).

Scenario: You finish a task, change the option from "new" to "completed", and an onclick changes the status drop down background to green (which I have working), but then posts/saves a field on the backend to the new option.

 

I have a page called "Actions" set up with url segments using

if ($config->ajax && $input->urlSegment1 == 'change-status') {
	//save update field on admin

}

However, I am a little fuzzy on how to actually pass the current page along with the new selected status to actually update the page (task). I guess I am not very far into my endeavor. Any help would be greatly appreciated.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...