Support » Plugin: Quick Post Widget » Change Checkbox input to Radio Buttons

  • Id like to make it so only one category can be selected at a time by using radio buttons. I’ve found the code that I think needs to be edited:

          $category_ids = get_all_category_ids();
          foreach($category_ids as $cat_id) {
          $cat_name = get_cat_name($cat_id);
          echo '<div class="categoryBox">
               <input type="checkbox" name="piw_cat[]"  value="'.$cat_id.'" class="categoryCheckBox" /> '.$cat_name.'

    I can see that the value needs to go back in ‘piw_cat[]’? Sorry if I don’t know the lingo. I’m a neophyte when it comes to php so any help would be much appreciated. Thank you!

  • The topic ‘Change Checkbox input to Radio Buttons’ is closed to new replies.