I will try that, in the meantime, here's what I did for testing:
PHP Code:
$myValue = $booking->status;
$testSetSelect = set_select('status', $booking->status);
$testSetValue = set_value('status', $booking->status);
$testSetCheckbox = set_checkbox('status', $booking->status);
$testSetRadio = set_radio('status', $booking->status);
$showResults = [$myValue,$testSetSelect,$testSetValue,$testSetCheckbox,$testSetRadio];
dd($showResults);
The result is quite strange:
Code:
$showResults array (5)
⇄0 => string (7) "request"
⇄1 => string (0) ""
⇄2 => string (7) "request"
⇄3 => string (0) ""
⇄4 => string (0) ""
(05-14-2024, 12:31 AM)ozornick Wrote:
HTML after output:
Code:
<form action="http://ci-demo/" method="post" accept-charset="utf-8">
<select name="myselect">
<option value="one">One</option>
<option value="two" selected="selected">Two</option>
<option value="three">Three</option>
</select>
<button type="submit">Send</button>
</form>
No, html output has not changed, the default value one is still the one selected.
Quote:Check value dump($booking->status);
It is not empty, it contains the value that should be reassigned to the option (see my test... actually where it looks like only the set_checkbox function works :S).