Attach file to cck file field in hook_form_submit()

Hi there.
I have cck file field named vote_picts. And I want to attach a file to it using this piece of code in hook_form_submit() (on create/edit node):

Cannot complete checkout Ubercart 3.0

still building my site and after installing ubercart, cart remains in 'checkout' after paypal sandbox is complete. I have to manually apply payments before customer can download files. Cannot find this problem in forum.

Change h1 in User login and password change form

Hello~

I'm trying to change the h1 titles that appear on the user login and request new password forms. I think this should be done using a form alter, but I have no clue where to start or how to identify what code to put in my template.tpl.php file.

Currently visting /user/login the h1 title is "Home", and when I click the request new password tab, the h1 title is "User Account" and strangely the title for /user path's title is "My Profile" instead of "Home"

I would like to override these with my own values.

Create new form element available to custom forms

Hi everyone,

Im trying to create a new form field, i have followed all the steps to create the field and am able to add the form element to any entity but i am unable to use the form element in a custom form defined in my module, the field is working as it should be but i only want it for a custom form.

any help or links would be much appreciated

<?php

function plexus_orders_field_info() {
return array(
'news_date' => array(
'label' => t('News Date'),
'description' => t('A Date Time Period'),
'default_widget' => 'news_date_widget',
'default_formatter' => 'news_date_formatter',
),
);
}

/**
* Implements hook_field_formatter_info().
*/
function plexus_orders_field_formatter_info() {
return array(
'news_date_formatter' => array(
'label' => t('Simple News Date formatter'),
'field types' => array('news_date'),
),
);
}

/**
* Implements hook_field_formatter_view().
*/
function plexus_orders_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
$element = array();

switch ($display['type']) {
case 'news_date_formatter':
foreach ($items as $delta => $item) {
if ($item['news_date']) {
$formattedDate = _dateToString($item['news_date']);

SQL Error when installing. CPanel

I uploaded Drupal 7.1 to public_html directory. I turned off register_globals. Now I'm trying to install the database. In CPanel I added a database. I then added a user with a rather complex password and added it with all permissions to the database. When entering the info on the database page it returns the following error:

Failed to connect to your database server. The server reports the following message: SQLSTATE[HY000]: General error: 1193 Unknown system variable 'NAMES'.

current-page as part of URL for simple view rewrite link

I'm trying to create a simple re-usable view to use as kind of menu.
I've got a taxonomy that is used on several content types.
So imagine I've got a view page somewhere that finds all my pants
And another view page somewhere that shows all my hats
But for each view, I can supply an additional 'color' argument to drill-down further into the view.
And imagine that I don't want users to have to deal with an exposed form... instead, I want to simply provide a 'color' menu in a sidebar (block) on those pages.

Pages

Subscribe with RSS Subscribe to RSS - Drupal 7.x