Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.
I have a hard time finding a good development environment that makes everything fly. What does your setups look like? Can you import all modules and get code completion etc.?
I'm developing a module that implements hook_form_alter to modify the node-edit form, specifically taxonomy. The form has several select boxes to choose taxonomy, but I need the validation phase to change those values depending on some logic, e.g. if the a term from both Vocab A and Vocab B are checked, the form should only submit the term from Vocab B.
The problem is I can't figure out how to change the form values before submittal. Right now the taxonomy selections are inside a fieldset "taxonomy." I've put a validate function on the fieldset element so it looks something like (simplified for the purposes of this post):
$element['#validate'] = array(
'my_validate_function' => array($my_extra_values),
);
//more code here blah blah blah
function my_validate_function($element, $my_extra_values) {
if ($element[$vid1][#value] && $element[$vid1][#value] > 0) {
$element[$vid2][#value] = 0;
}
}
But this doesn't actually change the form values for submission. I suspect the solution has something to do with form_set_value, but I can't decipher the documentation which says:
Use this function to make changes to form values in the form validate phase, so they will be available in the submit phase in $form_values.
Hi
i am building a module that has a form i need to use the valus from that form in another function (in the same module) is there a way to do it ? because i observe that the submit function can only return a path .
please help
Thanks in advance
I am hoping there is a module already available for what I am looking for. Basically I need to have interviews listed, but more importantly I need to keep track of who is being interviewed and when they were interviewed, or when they will be interviewed. For instance I would have a "People we have interviewed" section and a "people we will be interviewing soon" section. I would need a profile for the person and a list of times they have been interviewed in case they are interviewed more than once.
Is there any way to edit a group of nodes and give them the same taxonomy? Specifically, I am using the image gallery module with lightbox2, and I am wanting to use the image import module... however, since I have to edit each image separately to add them to the correct gallery, it is currently faster for me to just go to create content > image. Additionally, it would be nice if this could support free tagging, which would be an added feature for images.