WordPress.org

Forums

[Plugin: TDO Mini Forms] Category checkboxes instead of dropdown? (8 posts)

  1. Stephanie Leary
    Member
    Posted 6 years ago #

    Is it possible to show the categories as checkboxes rather than a dropdown? I dug into the widget code a little and saw that there are options for the widget, but I don't see a place to set them in the admin screens, and I don't know what the allowed values might be or I'd edit the widget itself. I also found the if($options['display'] == "dropdown" ) statement, but it appears that the else just repeats the dropdown list instead of showing something else.

    If this hasn't been implemented yet, I'll volunteer to work on it.

  2. the_dead_one
    Member
    Posted 6 years ago #

    Hi sillybean, no it hasn't been implemented. It's something on my TODO list for a while, but I end up working on the "big" features all the time.

  3. Stephanie Leary
    Member
    Posted 6 years ago #

    OK. If you don't mind, I'll work on it this weekend. I found the poorly-documented WP function that spits out the checkbox list, so the trick will be integrating that with the options.

  4. Stephanie Leary
    Member
    Posted 6 years ago #

    ... oh, how I hate reference sites that use frames. The function is wp_category_checklist.

  5. Stephanie Leary
    Member
    Posted 6 years ago #

    I think I've got it. Download the altered copy of tdomf-categories-widget.php here. You should also add #categorychecklist li { list-style: none; } to the forms CSS in tdomf-your-submissions.php -- otherwise the checkboxes will be bulleted.

  6. the_dead_one
    Member
    Posted 6 years ago #

    Excellent. I will look at this over the week and try and integrate it into the next release! (currently updating all the widgets to support the form hacker...)

  7. the_dead_one
    Member
    Posted 6 years ago #

    Hi sillybean, I've integrated your checkbox list however there seemed to be a few problems with it - it didn't seem to do preview or update the post (I've fixed this). I've had to extend it also to support the "form hacker" stuff. But by extending it, it was trivial also to support radio buttons (for single select). Anyway, thanks for the work and it'll be making an appearance in the next release. (Can I credit you by linking to http://www.sillybean.net?)

  8. Stephanie Leary
    Member
    Posted 6 years ago #

    Sure, thanks! Glad the fixes were easy.

Topic Closed

This topic has been closed to new replies.

About this Topic