Added post handling for next button