Drupal 7.x

Form calls validate but not submit

I have a custom module where I have a custom form with it's own form submit and validate functions, both being defined in the form creation. The issue I have is that on one of our servers, the form validate is being called, but not the form submit. (This is not happening on anyone's local instance.) This is confirmed by printing a dsm out to the page when the validation function is called and when the submit function is called. The submit dsm is never printed. My colleagues and I have banged our heads on the tables for the last few hours trying to figure this out. As far as we can tell, there's nothing wrong with the form array or with the submit and validate function names, and we've cleared the cache after each attempt. Does anyone have any ideas as to why the submit wouldn't be called but the validation would? Here is an example of our code:


function mymodule_profile_professional_form($form, &$form_state, $account) {

$info = mymodule_profile_get_custom_user_info();

$form['occupation'] = array(
'#type' => 'textfield',
'#title' => t('Occupation'),
'#default_value' => $info['current_occupation'],
'#prefix' => "",
'#suffix' => ''
);
$form['employer'] = array(
'#type' => 'textfield',
'#title' => t('Employer name'),
'#default_value' => $info['current_employer'],

Read more

What is a good theme to use for a community recipe site?

I would like to build a site where users can upload videos and their own articles. I want to build a niche recipe site Not sure what theme would be best for that?

theming field of particular node and page

How to theme (or do anything else with) some filed of particular node? What tpl.php file to create in order to override that field, and only that field, and only in that node? For example body field just for node/5.

And just one similar question. What tpl.php file to create in order to override particular field, in particular page?
Thanks in advance!

Nodes with lists of existing nodes

I am attempting to find a way to use Drupal to generate what we call "news clippings". These are (currently) emails that we send out frequently with a major topic (e.g.: Mexico) and anywhere from 10 to 100 links to news stories from a certain period organized in to sub-topics (e.g.: energy, agriculture, health, etc.). The problem is that we do this for about 20 different major topics and many of the "clippings" overlap, yet because we have no central database of these clippings each person working on an email for a major topic has to search out links, organize them in to sub-topics and prepare an email to send out.

My thought on how to alleviate and streamline this is to have two content types:

1) Article - for each individual article ("clipping"), to include fields for title, source, date, summary and taxonomy terms.

2) News Clippings - for a page on a major topic allowing a user to search for (using the terms and dates), select and include nodes of the "Article" content type and organize them in to lists.

However I am running in to a wall trying to come up with a way to get that second content type together using existing modules. I have tried using Books but I could not find a way to select from and include existing nodes in a book. I have also tried Nodequeue but had no luck setting it up to serve this purpose.

Read more

property? value? key?

dear all,
please check the following:

$form['#validate'],
$forrm[account],
$form['account']['legal_agreement']
$form['account']['legal_agreement']['decision']
$form_state['input']['decision']

who can tell me where do those keys come from?

also:

'#type' => 'radios',
'#description' => t('By registering at %site-name, you agree that
at any time, we (or our surly, brutish henchmen) may enter your place of
residence and smash your belongings with a ball-peen hammer.',
array('%site-name' => variable_get('site_name', 'drupal'))),
'#default_value' => 0,
'#options' => array(t('I disagree'), t('I agree'))
);

who can tell me where do those property come from?
on what basis can i define them?

Is it a rule and where are they from?
is it convention, and where can i find the blueprint?
is it arbitary? or something else.

Regards.

Good drupal theme for community site?

I would like to build a site similar to ifood.tv.....but of a different niche. I know their site was built with drupal but I guess I'm just trying to figure out what would be a good theme to build a site where users can post articles and their own videos. There are so many different themes. I just don't know how to go about knowing what one to use. Any advice? Thanks

Subscribe with RSS Syndicate content