Welcome Guest, Not a member yet? Register   Sign In
form validation if checkbox is cheched
#2

To know if a checkbox is checked it’s simple. If it is checked, the value is sent. If it is not checked, no value is sent. 

With this checkbox, if it is checked when you submit the form, in the controller you will get 3, if it is not, you will get NULL.

Code:
<input name='id_media_club[1]' id="checkbox_1 " type="checkbox" value="3">
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
Reply


Messages In This Thread
RE: form validation if checkbox is cheched - by includebeer - 03-24-2020, 02:01 PM



Theme © iAndrew 2016 - Forum software by © MyBB