Welcome Guest, Not a member yet? Register   Sign In
Not getting the value from the on/off switch checkbox
#2

[eluser]ivantcholakov[/eluser]
It is not necessary the value property to be set in conditional manner. I would just write 'value' => 1

When a checkbox is checked, its value property exists in $_POST under the corresponding name. On a unchecked box - the value is missing. In order always to track the state of the checkbox you may use the following Checkbox Helper: https://gist.github.com/mikedfunk/4004986

Edit: Ha, this one is better: https://gist.github.com/pporlan/8316087


Messages In This Thread
Not getting the value from the on/off switch checkbox - by El Forum - 03-31-2014, 12:03 AM
Not getting the value from the on/off switch checkbox - by El Forum - 03-31-2014, 02:18 AM
Not getting the value from the on/off switch checkbox - by El Forum - 03-31-2014, 04:38 AM
Not getting the value from the on/off switch checkbox - by El Forum - 03-31-2014, 11:50 PM
Not getting the value from the on/off switch checkbox - by El Forum - 04-01-2014, 12:00 AM
Not getting the value from the on/off switch checkbox - by El Forum - 04-01-2014, 12:42 AM
Not getting the value from the on/off switch checkbox - by El Forum - 04-03-2014, 11:31 PM
Not getting the value from the on/off switch checkbox - by El Forum - 04-04-2014, 02:03 PM



Theme © iAndrew 2016 - Forum software by © MyBB