Closed (fixed)
Project:
Mailchimp
Version:
6.x-2.x-dev
Component:
General
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
29 Jun 2010 at 18:34 UTC
Updated:
8 Aug 2013 at 16:51 UTC
I saw this on emf and I think it's an useful feature to have. I have defined an username field on the mailchimp list and I don't want that to be shown to either anon or auth users. Also, I'd like the name field to be displayed only for anon users.
I will try to contribute a patch for this thing.
Comments
Comment #1
netentropy commenteduse hook_form_alter from the Drupal api
Comment #2
hanoiiyeah well, it might be nice to have such a feature in a module for non-developers and to keep the module as flexible as possible.
Comment #3
levelos commentedGreat idea, but I think it's a fairly fringe use case, and the interface is already very busy, this would make it more so. I'll consider a patch, but am hesitant to include this. Indeed, it's exactly what hook_form_alter() is for.
Comment #4
hanoiiI don't mind throwing a form_alter in a module, but again, that's something that I will do and will not help anybody else. But as you say, it might just be me who needs it. I'd think the issue is better to leave it as postponed so it can be found and eventually, if others needs this, we can resume discussion. I guess if your position is not to include such a feature, I will do it as my own module.
Comment #5
levelos commentedAgreed on leaving it postponed. If you want to submit a patch, for that matter, I'd be happy to consider for inclusion. Thanks.
Comment #6
KMNL commentedOften I want to sync user profile info once they complete the registration process, but in the sidebar, only the email is required. (I'd prefer to not use CSS to hide elements). Hook form alter sounds like a temp fix to me.
Comment #7
davepoon commentedYou can easily create a custom module using form_alter hook to hide the fields you don't want in a form,
find out the form ID, find out the fields in the array you want to hide,
you can use dsm($form) if you are using devel module, or simply use print_r($form) to print out the array.
The following code sample is to hide the first name and last name fields in the subscription block.
Comment #8
Michsk commentedactually its
Comment #9
Michsk commentedmm, actually that doesn't work.
Comment #10
Michsk commentedlol, seems i forgot to reference the $form in the function.
Comment #11
levelos commentedThis feature is now available in 2.11.
Comment #12
levelos commented