I have a mailchimp subscription content type that add a user to the email list in mailchimp. It works great and adds them to the list.

However, I want deselect that checkbox when they fill out a second content type with a rule.

So, on creation of content type unsubscribe, check mailchimp list and remove email from list.

I have been search for ideas everywhere and cannot find anything in a tutorial or in Drupal Stack Exchange. Looking for ideas to try and hopefully figure out. Thanks!


if you wont find any other solution without coding to deselect that checkbox you can try to do it via your custom module (if you don't have any you will have to make one - that's different story).

function YOUR_MODULE_NAME_form_alter(&$form, &$form_state, $form_id){
  $form['field_order_details']['und']['0']['value']['#resizable'] = FALSE;

Something similar should work for your checkbox.

See hook_form_alter().

| improve this answer | |
  • Yes, I was wondering if I would have to create something custom. Not my skill set but will investigate hook_form_alter to see if I can take a stab at it. Thanks – timwhelan Jul 16 '18 at 11:40

For what its worth here is what I did...After the first content type gets submitted the emails subscribe to that Mailchimp list. When you create the second content type you use the same fields for the Mailchimp submission. In the settings for that field under 'Merge Fields', the field you match with needs to be exact. Be careful if you have many selections of the same name. That is what got me. When the second content type gets submitted it inherits the state of the first field and default. Selected. So, I created a Rule to unselect that field on the second content type and that removes is from the list. Wasted too many hours but that simple. Good Luck!

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.