You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (! empty($input = $request->getPost($field)) || ! empty($input = old($field)))
If you add <input type="radio" name="myradio" value="0" <?php echo set_radio('myradio', '0'); ?> /> to a form you can see that it will not stay checked on submission.
The text was updated successfully, but these errors were encountered:
If your radio button has the value "0" the set_radio() function will not output "checked='checked'" if that value had been clicked.
I believe this is because empty("0") returns true in the line at
CodeIgniter4/system/Helpers/form_helper.php
Line 894 in 54d370f
If you add
<input type="radio" name="myradio" value="0" <?php echo set_radio('myradio', '0'); ?> />
to a form you can see that it will not stay checked on submission.The text was updated successfully, but these errors were encountered: