Add an option to allow use of checkboxes instead of a multiple select to allow users to more easily select multiple vlaues.

Comments

joachim’s picture

Better still, just use what the vocabulary itself suggests.

This will give you the complete form element for the vocab:

$fields[$category]['user_terms'] = taxonomy_form($vid, $default, '', 'user_terms');

preetinder’s picture

any update on this one?

I was able to display checkboxes instead of multiple select list but I am having problem in saving the data.

Can you please post complete instructions to get this working?

joachim’s picture

Status: Active » Fixed
StatusFileSize
new2.79 KB

Committed this patch.

Uses the form element creation function from taxonomy module. Term saving changed accordingly.

This code will shortly be available in the snapshot release -- please try it and report back if you find any problems :)

scalp’s picture

I'm using the latest version which appears to have this patch in it, but it doesn't seem to solve the initial request which would be to display the taxonomy vocabulary using checkboxes in the user's profile page.

joachim’s picture

I think that's outside the scope of this module.

If you want checkboxes instead of a select, then logically you want that on all multiple-term vocabularies, not just those on user accounts. I think I've seen a module that does this.

scalp’s picture

joachim,
Thank you for the quick response. I've looked at some of the available modules out there and I don't think any actually will work for this. I'm not trying to change how the vocabulary is displayed on node creation (what the modules out there do), but instead I want to change how it is displayed on the user/%/edit page. User Terms seems to be the most logical place to do this since it is what is displaying the vocabulary on that page.

EDIT: I should add that I have seen and am trying to work out the Better Select module. This seems to come very close to what I want, but has two problems. 1) it takes over ALL multi-select lists when I really only want to affect the one on the user/%/edit page and 2) it seems to have some problems working with views. If there's a way to do this through User Terms to just affect the one it would be great!

joachim’s picture

I think this module should present vocabularies on the user account the same way core Drupal does them on nodes. Altering that UI is out of scope.

Try this: http://drupal.org/project/betterselect -- should work on all the select boxes it finds.

scalp’s picture

Looks like I was posting my edit at the same time you were posting a reply! I think I may be able to get the Better Select module to work. It just seems like overkill when I'm just trying to affect it in the one place. That said, you've put together a great module and thank you for the quick replies!!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.