Force user to press save for the master table if changes made in detail table |
3/8/2020 4:18:40 AM |
PHPRunner General questions | |
J
jacktonghk authorDevClub member
In a master/detail form, I need to validate the master table whenever a user made any changes to the detail table. I added the validations in the Before Update Event for the master table, it works with the Save button, how can I make it work with the 'BackToList' button? Thanks. |
|
![]() |
Sergey Kornilov admin 3/9/2020 |
When the user clicks the Save button data is committed to the database and there is something we can validate. I'm not quite sure what exactly you can validate when the user clicks 'Back To List' button. |
J
|
jacktonghk authorDevClub member 3/10/2020 |
When the user clicks the Save button data is committed to the database and there is something we can validate. I'm not quite sure what exactly you can validate when the user clicks 'Back To List' button.
|
![]() |
Sergey Kornilov admin 3/10/2020 |
Yes, you certainly can. Here is how you can disable the button: |
J
|
jacktonghk authorDevClub member 3/10/2020 |
Yes, you certainly can. Here is how you can disable the button: https://xlinesoft.com/phprunner/docs/getitembutton(itemid_recordid).htm And the best way is to use Details table Field Events to trigger this code: https://xlinesoft.com/phprunner/docs/field_events.htm
|
![]() |
Sergey Kornilov admin 3/10/2020 |
This button is enabled by default so there is no need to add any code at all. |
J
|
jacktonghk authorDevClub member 3/12/2020 |
This button is enabled by default so there is no need to add any code at all.
|
![]() |
Sergey Kornilov admin 3/12/2020 |
The same article show how to both enable and disable the button: |
J
|
jacktonghk authorDevClub member 3/13/2020 |
The same article show how to both enable and disable the button: https://xlinesoft.com/phprunner/docs/getitembutton(itemid_recordid).htm
|
A
|
ayctech 3/19/2020 |
Yes, I put the codes in the beader edit page onload event but it didn't work. Is it the right place for me to put the removeclass in order to enable every time before displaying the edit page? Thanks.
|
J
|
jacktonghk authorDevClub member 3/24/2020 |
try with jquery, replace the name with the button name $("input[id^=value_precio_total_compras]").prop('disabled', true); $("input[id^=value_precio_total_compras]").prop('disabled', false); $("a[id^=trigger-test-value_hora_desde_1]").css({"display":"none"}); $("a[id^=trigger-test-value_hora_desde_1]").css({"display":false});
|