javascript - Return checked option from array -


i using radio boxes save values array, issue having trying automatically check checkbox corresponding value after page refresh or whatever

i have tried following;

<h3 style="margin-bottom: 0px;">floating</h3></br> <input type="radio" name="lu_ban_data[noticetype]" value="multi"<?php echo ('multi' == get_option( 'noticetype' ))? 'checked="checked"':''; ?> /></input>  <h3 style="margin-bottom: 0px;">floating</h3></br> <input type="radio" name="lu_ban_data[noticetype]" value="floating"<?php echo ('floating' == get_option( 'noticetype' ))? 'checked="checked"':''; ?> /></input> 

the value being saved when click either 1 array (size=6) 'noticetype' => string 'multi' (length=5) corresponding checkbox isnt being checked.

value

anyone help?

checkbox

output markup

<div style="margin: 10px;">                         <h3 style="margin-bottom: 0px;">multiple</h3></br>                         <input type="radio" name="lu_ban_data[noticetype]" value="multi" /></input>                         <h3 style="margin-bottom: 0px;">floating</h3></br>                         <input type="radio" name="lu_ban_data[noticetype]" value="floating" /></input>                     </div> 

the "checked" not being printed

you in array? how getting array?

to use get_option() @ point have use update_option()

try echo get_option( 'noticetype' ) , see stored in wordpress option.


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -