Custom form values in hook_form_alter() not available in custom validate function

Custom form values in hook_form_alter() not available in custom validate function

I’m modyfing a node form to add a few extra fields. On submit, I need to program some extra logic to these values then save them to the node object. function module_form_alter(&$form, &$form_state, $form_id) { if($form_id == ‘my_node_form’) {... read more
Views UI doesn’t provide links to expand fieldsets anymore

Views UI doesn’t provide links to expand fieldsets anymore

I have moved an entire drupal site to another server. While everything else seems to work fine, I can’t quite access collapsed fieldsets in Views UI anymore. It looks like this All fieldsets (STYLE SETTINGS and so forth) are collapsed. The fieldset label however... read more
Custom form values in hook_form_alter() not available in custom validate function

Pseudo-fields and custom entity properties from additional schema

I’m trying to add property information to an entity which uses the entity API. Working from the commerce_product module I am trying to manage additional information outside of fields and in my own database that ends up attributed with the resulting product... read more
Custom form values in hook_form_alter() not available in custom validate function

Count total number votes a user has gained

I am using rate module where users can plus or minus the articles created by an author. Now, in the profile page of the author, I want to display the total number of votes he/she has got from all his articles. Is there any way to do this without using db_query ? Thank... read more
Custom form values in hook_form_alter() not available in custom validate function

Change the sorting order used for Book nodes

How can I change the order used for Book nodes, which by default is based on weight and title? I have a set of nodes displayed inside a page that use a structured book. I want to display them ordered by weight and random, instead of weight and name. The book is used... read more
Custom form values in hook_form_alter() not available in custom validate function

Return Table and Form in page callback

I have a problem returning table and form in page callback at the same time it only works if one of them only returned. function _table_maps(){ $query = db_select(‘maps’,’m’); $result = $query->fields(‘m’)... read more
Custom form values in hook_form_alter() not available in custom validate function

Filter a view basing on a user attribute

I’m building a Drupal 7 site with a content type for events, and a view that displays a calendar of upcoming events. Events can be at one of two locations, and each user is also associated with one of the two locations. I’d like to set the calendar up so... read more
Custom form values in hook_form_alter() not available in custom validate function

Adding form placeholders to text form elements

Is there a way to add placeholders to a form with a module, or should this be done with a form template? read more
Custom form values in hook_form_alter() not available in custom validate function

How do I handle smart quotes and curly apostrophes?

I’m building a new Drupal site, and the content authors and editors ared dyed-in-the-wool Microsoft Word users. I’ve got WYSIWYG set up to force all pasting to be treated as "Paste from Word", so much of Word’s garbage seems to be handled... read more
Custom form values in hook_form_alter() not available in custom validate function

Allow groups of users to edit a single Webform

I need to enable groups of users to edit one Webform so that they can collaboratively complete a questionnaire. I am not concerned with two people editing at the same really. I’ve seen mentioned the Organic Groups module and the OG Webform module to enable this... read more
Custom form values in hook_form_alter() not available in custom validate function

How I can intercept an image field upload and validate it?

I have a content type with an image field. I need to validate this field because I need to check if user upload a real image or only a file with image’s extension (like jpg, gif, png etc). I have tried and readed 100+ things but none resolve my problem. I have... read more
Custom form values in hook_form_alter() not available in custom validate function

Adding CCK field to solr index

We have a cck field called “keywords”. We need to add this field to the solr index so we can search on it from outside of drupal. How are CCK fields managed in the solr index? UPDATE: I created a module “apachesolr_search_additions” and the... read more
Custom form values in hook_form_alter() not available in custom validate function

Display specific nodes on specific pages

How do I display specific nodes from a view on specific pages? For example, I create a CCK field (“Display on node id:”) for the content type Ads, and put there IDs of content type Basic page where I want display this Ads. Is there to achieve this without... read more
Custom form values in hook_form_alter() not available in custom validate function

I can’t enable SimpleTest due to open_basedir restriction being in force

I can’t enable SimpleTest due to an open_basedir restriction being in force for my Drupal7 installaton which resides on a Linux server running PHP 5.2.12. I found the directive under my PHP.INI file but it is already commented out there. When I try to enable... read more
Custom form values in hook_form_alter() not available in custom validate function

How to delete all translations when deleting a node using default language?

I’m trying to delete all translations when deleting a node using default language? For that purpose, I am using the hook_node_delete, but I am not able to invoke node_delete() from it. It cause a fatal error and the process can’t terminate. Even the first... read more
Custom form values in hook_form_alter() not available in custom validate function

Create a print tpl for page views

I’m working with print and I would to create a tpl for a specific view (for a “page” display). Is it possible, using the naming convenction? read more
Custom form values in hook_form_alter() not available in custom validate function

Access view exposed filter arguments in field view

My problem is that I can’t access $view->filter[‘my_filter_field’] from my views-view-fields.tpl.php file. In views-view.tpl.php I get my correct View object with the arguments sent via AJAX as exposed filter parameters, but how can I get this... read more
Custom form values in hook_form_alter() not available in custom validate function

How to create a Category Article listing with subcategories?

I am new to drupal 7 and I want following page: Main Category (1) Subcategory1 – post1 Details – post 2 Details (2) Subcategory2 – post1 Details – post 2 Details How can I do that? I think I can use Views but I need some further... read more
Custom form values in hook_form_alter() not available in custom validate function

Change label max length on all field types

The default max length for all labels of all field types is 128. The db can handle 255. So no schema change. How can I change the default max length to 250? read more
Custom form values in hook_form_alter() not available in custom validate function

Conditional token pattern

I am looking for a module or a hook that allow me to use if conditions with tokens. For example I want to check if a field is equal to a specific value or text [if][field_name][eq]hello[then][field_name_alt] any ideas will be helpful. read more