#default Behavior Funny in D7

Hello again,

I'm trying to fill a form with default values when there is one available in my table. In this case, one is definitely available.

Expected result is first name has "bob" pre-filled in the first name field. Actual result is the field is empty. I used the watchdog function to double check I was getting something back from my function and the correct value shows up in drupal's watchdog.


function cg_volunteer_form_alter(&$form, $form_state, $form_id) {

if ($form['#id'] == 'user-profile-form' || $form['#id'] == 'user_profile_form'
|| $form['#id'] == 'user-register-form' || $form['#id'] == 'user_register_form') {
//I force the entire thing on top with the weight -999

$def_usr_vals = cg_get_user_info ();
$cg_my_name = $def_usr_vals['cg_first_name'];
watchdog('cg_volunteer', 'cg in form_alter %dumb', array('%dumb' => $cg_my_name), WATCHDOG_NOTICE, $link = NULL);

$form['cg_first_name'] = array(
'#type' => 'textfield',
'#title' => t('First Name'),
'#default' => $cg_my_name,
'#maxlength' => 50,
'#suffix' => '

',
);
}
};

function cg_get_user_info (){
global $user;
$cg_u_fn = db_select('cg_contacts', 'cginfo', array('cg_prefix', 'cg_first_name', 'cg_last_name', 'cg_address1', 'cg_address2', 'cg_city',
'cg_state', 'cg_zip_first5', 'cg_zip_last5', 'cg_phone1', 'cg_phone2'));

Having trouble installing modules since the upgrading from 7.0 to 7.2

When I try to install a new module by uploading the tar.gz file through admin->modules-install new modules, the module doesn't install and I get the following error:

An AJAX HTTP request terminated abnormally. Debugging information follows. Path: http://davidsonenberg.com/authorize.php?batch=1&render=overlay&id=31&op=do StatusText: ResponseText: ReadyState: 4

If I then click on the error page I get this:

Local copy of website only showes front page.. all else access denied.

Hello, I have solved this problem before but can't remember how.

I downloaded a copy of my sql database in a zip file. Now I want to create a local version of my site. The steps go well until I got to update.php.
After altering settings.php for update_free_access = true;
I can only access the front page.
All other pages are access denied.

I have read and performed the Securing file permissions and ownership setup
http://drupal.org/node/244924

module WEBFORM - how to make a new function : RESEND form data

Hello,
I need add the function RESEND to module webform - customer opens the completed form from the past, edit any data, and sends it as new one - in the list of completed forms will be show the original and the new.

How to do it?

Thank you very much!

Change system domain

Hi all,
I had a website up-and-running under lets say www.domain-old.nl
Because it actually has to be available under www.domain-new.nl, I copied all files from one domain, to the other, and using the same database.

The website seemed to be running ok on domain-new (after changing the base_path in settings.php). But many times it points still to the domain-old.nl website (like the CSS files). It also shows in admin the domain-old URL instead of the new one.

Adding cck field breaks non-related view?

Hi,

I'm using drupal 7.0 (noticed this same issue in 7.2) and I have a weird issue. If I add completely new cck fields to one of my content types it seems to break a view that affects almost all pages on my site. If I delete that field, sometimes I have to delete another, and flush cache it seems to work again. This is the error below. Anyone run into this?

Thanks,

Pages

Subscribe with RSS Subscribe to RSS - Drupal 7.x