Closed (fixed)
Project:
Campaign Monitor
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Reporter:
Created:
5 Jan 2012 at 17:26 UTC
Updated:
31 Jan 2012 at 19:20 UTC
Jump to comment: Most recent file
Short: webservice call should be done in the submit handler.
I think the data should not be sent to Campaign Monitor webservice unless the form is valid. It's not the case at the moment since the webservice is called in the form validation handler.
I've altered the form using hook_form_FORM_ID_alter(), marking some custom fields as required. I am then able to subscribe without filling the (altered) required fields. I think this is not the excepted behavior.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | submithandler-1395344-3.patch | 1.58 KB | nclavaud |
Comments
Comment #1
cableman0408 commentedI see the problem, but it's create this way to be able to mark/highlight the form-errors with form_set_error, if the CM web-service reports any problems or fails. I can look into the issue, but at the time the code was written I could not find any another solution. Any suggestions on how to solve this problem is welcome :-)
You could, for now, override the validation function (I know that its not an optimal solution).
Comment #2
nclavaud commentedYou can use form_set_error() and $form_state['redirect'] = FALSE; together to display the form again (as a failed validation would do).
Here is a patch (not tested).
Comment #3
nclavaud commentedComment #4
cableman0408 commentedThank you very much, I will look into this.
Comment #5
cableman0408 commentedThe patch have been used to resolve this issue in the development branch. If you could test that it now works for your case... I would appreciate it. :-)
Comment #6
nclavaud commentedYes it does work as expected now. Thanks!
Comment #7
selvaraj123 commentedHI All
Could you please tell me step for campaign monitor module.
Regards
Selvaraj.C