Download & Extend

Store mcapi object in form_state

Project:MailChimp
Version:7.x-2.x-dev
Component:Lists
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review

Issue Summary

Can we store the mcapi object in

<?php
mailchimp_lists_user_subscribe_form_submit
()
?>
? In that way it is possible for other submit_handlers to check the state (errorCode, errorMessage) of the request and take appropriate action. I needed it for redirecting the user if there was no error. If there was an error the form should be shown with the error message.
I attached a patch that simply stores the $mcapi var in the form_state.
AttachmentSize
mailchimp_store_response_state.patch789 bytes