We have added custom fields in Campaign Monitor. All Fields are shown in the admin interface and every checkbox is checked to show the fields when registering for a newsletter.
But on the newsletter form (block) there is only 2 custom fields + Email and Name. The two Custom Fields are DropDown Lists, the other fields are added as Text and Number Fields, they are not shown.
Is this me doing something wrong?

Comments

JThan’s picture

I have just tried with a brand new list - it gets shown on the admin site, but on the form, Text and Number Fields are not shown.

JThan’s picture

For Text Fields the problem is in line 520

Change
if ($field['FieldName'] == 'Text') {
to
if ($field['DataType'] == 'Text') {

Number Fields are not implemented yet. One could add the following code, but you'd still have to validate that only numbers are given.

else if ($field['DataType'] == 'Number') {
        $form[$key] = array(
					'#type'          => 'textfield',
					'#title'         => $field['FieldName'],
					'#size'          => 20,
					'#maxlength'     => 100,
					'#default_value' => $subscriber['CustomFields'][$field['FieldName']],
				);
}
ssherriff’s picture

Assigned: Unassigned » ssherriff
Status: Active » Fixed

I have updated this code and checked it in, it will be available in the next release.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Status: Closed (fixed) » Active

I've tried the solution mentioned in #2 but custom fields of the type "Text" still aren't showing up for me on the user registration page (user/register).

The checkbox appears for the appropriate list, but there are no custom fields, despite them all being checked in the module settings.

I also have a field of the type "Multi-Options (select many)" and this isn't appearing either. I see these are coded as "MultiSelectMany" so it looks like the module supports them.

I'm using Drupal 6.14. Any ideas? Thanks.

Anonymous’s picture

Status: Active » Fixed

I just realised the original discussion refers primarily to the subscribe form in blocks, not the registration form. This actually does work. I will open a new support request for my problem.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.