Good Evening,
I had tried 2 days, but I can't do this:
I would like to get a record from a table and after I would like to change a column (status) in the record and I would like to save the change. I setted DB Read to Multi read = No because I am looking for 1 exact record based on ID. I also would like to know how it works with state ON.
I can read the record and all of the columns I need. Debugger Data Array info:
I want to manipulate the status. I tried like this (I have made a hidden input for this in Designer area: <input type="hidden" name="status1" id="status1" value="" />) and I created a Custom Code in Setup area:
I wanted to update the cell (column) with DB Save like this (Model ID is ON and = change_status):
or like this:
I used the ID to let the system know this record must to be updated.
What did I make wrong? Sorry for my data array handling is very poor.
I had tried 2 days, but I can't do this:
I would like to get a record from a table and after I would like to change a column (status) in the record and I would like to save the change. I setted DB Read to Multi read = No because I am looking for 1 exact record based on ID. I also would like to know how it works with state ON.
I can read the record and all of the columns I need. Debugger Data Array info:
Array
(
[option] => com_chronoforms5
[chronoform] => Test
[id] => 27
[uniq_id] => ab044ac614e4bcfd571091cf3b338b1b5c7b13b7
[user_id] => 241
[status] => Start
[change_status] => Array
(
[id] => 0
)
)
I want to manipulate the status. I tried like this (I have made a hidden input for this in Designer area: <input type="hidden" name="status1" id="status1" value="" />) and I created a Custom Code in Setup area:
$status1 = 'In Progress';
I wanted to update the cell (column) with DB Save like this (Model ID is ON and = change_status):
<?php
return array( 'change_status.id' => '27', 'change_status.status' => $status1 );
?>
or like this:
$form->data['status'] = $status1;
I used the ID to let the system know this record must to be updated.
What did I make wrong? Sorry for my data array handling is very poor.