In this video, you will learn how to create dialogs in Centrldesk.
With dialogs you can guide users through your application. In this example, we want to open a dialog by clicking a button on a page and guide the user through several dialogs. So let's start building our dialogs:
Steps:
- First we go to the page editor by clicking on the Edit Page button.
- Add a button using drag and drop.
- Select the button and change the name on the right side to "Open Dialog".
- Optionally choose an icon for the button and change the color.
- Switch to the Pages view on the left side.
- Then click on "New Page".
- The "Create App Component" page dialog is displayed.
- Enter the value "Enter Text" for Name and confirm the dialog with "Create".
- Add a text input to the page using drag and drop.
- Add a button using drag and drop.
- Select the button and change the name on the right side to "Go to second dialog".
- Switch to the Pages view on the left side.
- Then click on "New Page".
- The "Create App Component" page dialog is displayed.
- Enter the value "Enter Date" for Name and confirm the dialog with "Create".
- Add a date picker to the page using drag and drop.
- Add a button using drag and drop.
- Select the button and change the name on the right side to "Close".
- Switch to the Pages view on the left side.
- Select the page "Home".
- Select the "Open Dialog" button.
- On the right side under the item Actions we now configure an action when clicking on the button.
- Click Add next to On Click.
- The Flow Editor opens.
- On the left side, under App Components, we now drag and drop the "Pages" element into the center of the Flow Editor.
- The "Use Page" dialog opens.
- Select "Show Dialog Enter Text" on the left side and confirm with OK.
- On the left side, under App Components, we now drag and drop the "Pages" element into the center of the Flow Editor.
- The "Use Page" dialog opens.
- Select "Show Dialog Enter Date" on the left side and confirm with OK.
- On the left side, under Scope, we now drag and drop the "Page Control" element into the center of the Flow Editor.
- The "Page Control" dialog opens.
- Select "Validate Inputs" on the left side and confirm with OK.
- Connect the submit output of the "Show Dialog Enter Text" block with the Input of the "Validate Inputs" block.
- Connect the valid output of the "Validate Inputs" block with the Input of the "Show Dialog Enter Date" block.
- Close the Flow Editor by clicking the Close button in the upper right corner.
- Close the Page Editor by clicking the Close button at the top.
- Now the home view of our application is displayed again.
- Clicking on the "Open Dialog" button opens the first dialog with the input of text.
- By clicking on the button "Go to second dialog" the second dialog with the date input is displayed.
- Clicking the "Close" button closes the dialog.