I need to simulate a form that is similar to the interface seen during installation of any software. There are next and back buttons and the all the information entered by the user is processed only when he/she clicks the finish button.
When the user clicks the back button, the previous entered information is showed to him/her.
When the user clicks the next button the next screen is show to him/her. All displayed information is shown in one form.
There are 3 section which I need to show the user.
- Section 1 - pressing the next button will show section 2
- Section 2 - pressing the back button will show section 1 and pressing the next button will show section 3
- Section 3 - pressing the previous button will show section 2 and pressing the finish button will process all the information entered in section 1,2 and 3.
Currently planning to implement the solution listed below :
- Create one form
- Add all the element for section 1 and create a next button event that will hide all the element shown in section 1 including the button and show all the elements section 2.
- Create button event for the back button for section 2 such that it hides all the elements in section 2 including the button and displays all the elements in section 1 and the next button to hide all the element in section 2 including the button and show all the element in section 3
- Create similar button event for section 3
Are there any better solution than the one describe above. If yes, please describe the approach. Any help provided will be greatly appreciated.