Hi
let me know if can do this:
i have some binary field 'model.field1'='0' that changes to 'model.field1'='1' directly over the cc list without problems,
I need some php code that checks if max number of 'model.field1'='1' has been achieved in order to allow or not that this record will be changed
let me know if i can do this with php or JavaScript code and some clue how intercept this action
Thanks in advance
let me know if can do this:
i have some binary field 'model.field1'='0' that changes to 'model.field1'='1' directly over the cc list without problems,
I need some php code that checks if max number of 'model.field1'='1' has been achieved in order to allow or not that this record will be changed
let me know if i can do this with php or JavaScript code and some clue how intercept this action
Thanks in advance
Hi Teldrive,
Please try to change the binary link to point to a new custom action, say "custom", now config this action to point to a custom form event, say "custom_event".
Then in the "custom event" you can do your check using a "db read" (pass any params you need in the link) and execute the toggle using a "Connection action", write "toggle" in the "action name" field.
I didn't try this before but this is how it should be working, let me know if it doesn't.
Regards,
Max
Please try to change the binary link to point to a new custom action, say "custom", now config this action to point to a custom form event, say "custom_event".
Then in the "custom event" you can do your check using a "db read" (pass any params you need in the link) and execute the toggle using a "Connection action", write "toggle" in the "action name" field.
I didn't try this before but this is how it should be working, let me know if it doesn't.
Regards,
Max
Hi Max, thanks by reply
let me ask you some additional help, how can i " change the binary link to point to a new custom action,? " the rest of programing seems to be easier
let me ask you some additional help, how can i " change the binary link to point to a new custom action,? " the rest of programing seems to be easier
Hi Teldrive,
Just copy the binary link before your disable it, and change the "act" param value in the url, use your new action's name.
Regards,
Max
Just copy the binary link before your disable it, and change the "act" param value in the url, use your new action's name.
Regards,
Max
Hi Max, thanks i understood the idea , i replaced binary by this php code and it works😀
model.field:return ($row['model']['field']=='1') ? "<a href='/es/component/chronoconnectivity5/?cont=lists&act=test&ccname=cc_list&gcb={model.id}'><img src='/libraries/cegcore/assets/images/enabled.png'/></a>" : "<a href='/es/component/chronoconnectivity5/?cont=lists&act=test&ccname=cc_list&gcb={model.id}'><img src='/libraries/cegcore/assets/images/disabled.png'/></a>";
This topic is locked and no more replies can be posted.