This PHPMaker 2024 project will show you how to use Modal dialog to get input parameter from End-Users, after that, system will process Row Custom Action, based on that input parameter. It is implemented both for each Single-Record and Multiple-Records in List Page.
For your information, since v2024, PHPMaker will verify, whether the Action name has already been defined in Page_Load server event. If it has not been defined, yet, then system will display the message that the Action is not found, so that we cannot process the Action from Row_CustomAction server event.
As we have already known, there are no built-in function in PHPMaker that will receive input parameter using Modal dialog, before processing Row_CustomAction server event in List Page. Therefore, we need to find out the solution by ourselves, how to get input parameter from End-Users before processing in Row_CustomAction server event.
In this example, you will see that each row in List Page of Table 1 has a green button with tooltip Add or Subtract. This button is defined from ListOptions_Load and ListOptions_Rendered server event. If you click on the button, then system will display the Modal dialog, so that End-Users are able to type the value, and then click on the Submit button to proceed to the next step. System will then Add or Subtract the existing Value of the current record, by the input parameter from End-Users. After that, then system will reload the table to see the new value immediately by using AJAX.
Next to the green button, you will see the yellow button, at each record in List Page. This button will give you the idea how we can define the Action name simply from Page_Load server event only; and no need to use ListOptions_Load and/or ListOptions_Rendered server events. However, there are some limitation. We cannot change the Label that will related to each record, for example, to display the existing value in related row. This button will process the related record in Row_CustomAction server event, and then reload the current page by using Post Back method.
In addition, you will also see the blue buttons with the Tooltip of Add or Subtract Multiple Values, that located at Upper and Lower panel of the Table in List Page of Table 1. If you click on the button, then system will display the Modal Dialog, so that End-Users are able also to type the value, and then click on the Submit button to proceed to the next step. System will then Add or Subtract the existing Value of the selected record(s) by the input parameter from End-Users.
By using this project you will learn so many things:
- How to display the Modal Dialog based on click event of button that belongs to each record in order to get input parameter from End-Users before proceed to doing Row Custom Action in List Page.
- How to use Page_Load server event in order to display the button in each row in List Page, that will also solve the issue of Action xxx not found in PHPMaker v2024, when record is processed in Row_CustomAction that related to the green button
- How to display the changed value immediately in a row of List Page, after Row Custom Action for one single record is performed.
- How to display the Modal Dialog based on click event of button at Upper/Lower section of Table in List Page, in order to get input parameter from End-Users, before proceed to doing Row Custom Action for the selected records in List page.
- How to change the Multi-Update with Modal Dialog built-in feature, so that we may implement Row Custom Action for Multiple-Records in List Page.
- How to use Custom Field in order to provide Textbox control to get input parameter from End-Users.
- How to implement Row Custom Action in Row_Updating server event for multiple records.
- How to skip normal updating process in Row_Updating server event in order to implement Row Custom Action with Modal Dialog for Multiple-Records.
- How to display detail information of the selected records in Modal Dialog of Multi-Update page so that End-Users are able to double check before proceeding to next step.
- How to make the checkbox will be auto checked when the Multi-Update form is loaded.
- How to display the Confirmation Page in Modal Dialog of Multi-Update page, before saving the changes in Database.
- How to add Custom Button on each record in List Page by using ListOptions_Load and ListOptions_Rendered server event.
- How to create Custom Language Phrase with the related icon, that will be used in the Custom Button that we have just created at the previous step.
- How to customize the background color of the Custom Buttons on each record and also on the Upper/Lower section of table in List Page.
- How to use Sweet Alert to display a Modal dialog with one Textbox control inside to receive input parameter from End-Users.
- How to validate the input parameter from Sweet Alert side.
- How to display the success message after Row Custom Action is completely done for each row and also for the selected rows in List Page.
- How to prevent deleting records by using Row_Deleting server event.
- How to change the default width of Modal Dialog that used by PHPMaker 2024 project.
- How to hide the update cancelled warning message in Row_Updating server event.
- How to make a global function in order to display the default page by using server event.
- How to add blank target for the certain Menu Items so that it will open the page in a new tab of browser.