All Questions
26 questions
1
vote
1
answer
537
views
how to get all options values of simple hierarchical select in drupal $form?
i have writed this code to unset empty terms :
function shs_selective_form_alter(&$form, &$form_state, $form_id) {
if ($form_id == 'views_exposed_form' && $form['#id'] == '...
3
votes
1
answer
318
views
Create a term reference with a select list selecting one at a time
I have a couple term reference fields, one of which allows unlimited values, and one of which allows 4 values. I'm using Simple Hierarchichal Select as the widget for the unlimited one, and it lets ...
0
votes
1
answer
867
views
How to fix error Undefined index: parent in taxonomy_form_term_submit()?
I got below error on my site recently.
Notice: Undefined index: parent in taxonomy_form_term_submit() (line 829 of /var/www/Sites/xxxxx/modules/taxonomy/taxonomy.admin.inc).
I google it and find ...
1
vote
1
answer
58
views
What to do when saving nodes one-by-one and bulk resaving give different results
I'm using the Location Taxonomize module with the Address Field module to create a vocabulary of node locations.
I want to re-create the locations from scratch, and I have a term reference field ...
0
votes
1
answer
67
views
node_load() in a form and display it in an attached form markup
How can i show every node title which is related to the taxonomy term in a form field? I work a little bit around and think i'm really close for a solution, but thats a little bit too tricky for me. I ...
1
vote
1
answer
56
views
Can I assign a taxonomy to a content type's term_reference field at runtime?
I need to manage a few different types of objects, let's say "car", "pickup", and "van". These are similar enough (for my purposes) that I can define a single content type and associated code for "...
0
votes
2
answers
450
views
Taxonomy exposed filter with parent hierarchy only
I have a taxonomy vocabulary with terms in hierarchical order. If I use an exposed filter, with level depth, all terms are listed, which are > 6,000. I want only the parent terms, which are only ...
1
vote
1
answer
781
views
How to set up multiple hierarchy taxonomy?
I am struggling to find the solution for the following situation: I am building a tourism site with POIs as nodes (Drupal 7). The POIs are categorized/tagged in a State-County-City hierarchical ...
1
vote
1
answer
387
views
Hierarchical select ajax conflict in custom bootstrap theme
I have created a custom theme from scratch using twitter Bootstrap. In my content type there is Taxonomy term Hierarchical Select (HS) list.
Problem: When authenticated user try to select any term ...
2
votes
1
answer
191
views
Programmatically loaded taxonomy form ajax errors
I load a taxonomy term in the edit form via the following code:
module_load_include ( 'inc', 'taxonomy', 'taxonomy.admin' );
$vocabulary = taxonomy_term_load ( $tid );
$form = drupal_get_form ( '...
1
vote
1
answer
535
views
Alter taxonomy autocomplete value
I need to alter the element value of a taxonomy autocomplete field before it is processed and can't seem to find a way of doing so.
taxonomy autocomplete fields have an element validator attached, ...
1
vote
0
answers
334
views
drupal commerce: issue with add to cart form and translated products
Hello I have some transtaled products with some attributes, those attributes are also taxonomy terms translated, I have a language switcher.
The "add to cart form" on the product display do not works ...
2
votes
2
answers
1k
views
Term reference field lists the terms for all the languages
What I meant is that I have the i18n module installed and configured for content and taxonomies, this is what I need
I have a taxonomy called "Colors" I have translated all the terms of this taxonomy ...
2
votes
1
answer
922
views
how can i attach a taxonomy to the users profile?
I use drupal 7 and need to attach a certain taxonomy to a user. there is module for drupal 6 but as i see there is no module for that in drupal 7. how can i do that in my module by coding?
why do i ...
0
votes
1
answer
125
views
Default terms based on user role
I have Node with taxonomy terms.
Example
Term A
Term B
Term C
and user role like this
Role 1
Role 2
Role 3
Using Taxonomy Access Control(TAC) I can limit Role 1 can add all terms, Role 2 only ...
0
votes
0
answers
174
views
Additional textfield for taxonomy term reference field
In the site, which I develop, I need to have workers, who provide specific services. Each worker for specific services has their own prices. Workers are drupal users, Services are drupal taxonomy ...
0
votes
2
answers
2k
views
Programatically save comma-separated string as value of taxonomy field
I have a comma-separated string $string of the form "term1,term2,term3" and I would like to save it as the value of a taxonomy term field that is attached to my node. I have tried
$node->...
3
votes
3
answers
9k
views
display a taxonomy terms as autocomplete using form API [closed]
I am writing my own module. I want to display a taxonomy terms as a autocomplete field in my form using form API. How can I do that?
I am using Drupal7.
1
vote
1
answer
232
views
Validation error on term-reference field when ajax'd option is submitted?
I get the error "Illegal choice" when I submit a form with a multi-select option that was freshly created via ajax. Workflow is like this:
User loads node edit form
User needs to select a non-...
1
vote
2
answers
1k
views
Drupal 7 dynamic dropdown list options An illegal choice has been detected
I have created a node type of Advertisement which holds all the information for adding new advertations to the website, including categories.
there are 3 levels of categories and i need to make a ...
1
vote
0
answers
369
views
Autosubmit Hierarchical select
I'm building a custom block that shows Hierarchical select form , I'm trying to autosubmit it after make a selection I'm using this code :
(function ($) {
Drupal.behaviors.exampleModule = {
...
2
votes
2
answers
1k
views
Hierarchical select hook form alter
I have a problem with getting my module_form_alter to work for hierarchical select. I am running on Drupal 7 and my content type is called mytemp and I'm pretty sure my form-id is mytemp_node_form. I ...
0
votes
2
answers
1k
views
use taxonomy terms as values for radio buttons by code
I've built a function for select / checkboxes but I can't get it working for radio buttons.
/**
* helper function to get taxonomy term options for select widget
* @arguments
* @return array of ...
4
votes
2
answers
6k
views
Populate a select box with a vocabulary
I have a select box that I want to populate with a particular taxonomy programmatically. If i was was to use a taxonomy vocabulary how would i populate a particular select box in my form. My form is ...
9
votes
4
answers
14k
views
How to add taxonomy term reference field in a custom drupal form
A menu item is defined with drupal_get_form as callback function and returning the form from call back function. How can I add taxonomy_term_reference field to this form?
$items['files/add'] = array(
...
0
votes
1
answer
144
views
How do I set up user's "Favorite Tags" and "Ignored Tags" tag subscriptions?
This website shows user-specific "Favorite Tags" and "Ignored Tags" listing tags the user subscribed to. Based on these subscription lists, content is being sorted in "views".
How do I let the users ...