1. Elvis
  2. CMC - Mailchimp for Joomla!
  3. Thursday, 19 December 2013
  4.  Subscribe via email
Hi!

I have a template override for user registration and checkbox (in fact whole fieldset) for mailchimp subscription doesn't appear.
Because of the site specifics I'm calling registration form fields separately like this:

<?php echo $this->form->getLabel('address'); ?>
<?php echo $this->form->getInput('address'); ?>


Of course, checkbox is shown if using default registration page without template override.
I've looked inside com_cmc code and tried to figure out what to change to get this working, but without success.
I saw function build() in helpers/xmlbuilder.php but didn't get any further.

I would really need this and would need a little guidance/help from your side.
I guess it would help all the others that are using template overrides.

Thanks!
Responses (3)
Daniel Dimitrov
Support team
Accepted Answer Pending Moderation
Hey Elvis,
So actually we extend the default registration form. If you do var_dump($this->form) you should see all the mailchimp fields in there. You can call them separately.

Cheers,
Daniel
Please if you use our extensions be so kind and review them at JED
Matukio | Hotspots Pro | CComment Pro
  1. more than a month ago
  2. CMC - Mailchimp for Joomla!
  3. # 1
Accepted Answer Pending Moderation
Hi!

I have put this project of mine to the side, but now I want to move on.
Like you said, CMC fields are there.
But if I called them separately like this
<?php echo $this->form->getLabel('cmc_newsletter'); ?>

and
<?php echo $this->form->getInput('cmc_listid'); ?>

they aren't displayed.

I saw a little difference in field rendering between Joomla core fields and CMC fields when using default registration:
Joomla fields are rendered like
<input type="text" name="jform[city]" id="jform_city" value="" class="required" size="30"/>

and then I call them like this:
<?php echo $this->form->getLabel('city'); ?>

But CMC fields have additional value [cmc] inside name tag:
<input type="checkbox" name="jform[cmc][newsletter]" id="jform_cmc_newsletter" value="1" class="inputbox cmc-checkboxes cmc-checkbox-subscribe">

Is this the reason why these fields aren't displayed if I call them the way I did?
What am I missing?
  1. more than a month ago
  2. CMC - Mailchimp for Joomla!
  3. # 2
Accepted Answer Pending Moderation
I've managed to solve this.
I missed two important things:
[ol]
[li]There is a hidden field which CMC uses (cmc_listid)[/li]
[li] I've forgot to create fields in com_users/models/forms xml files[/li]
[/ol]

So fields are displayed in registration and profile views, I didn't test yet, if mailchimp works, but I don't see any reason why it shouldn't.
  1. more than a month ago
  2. CMC - Mailchimp for Joomla!
  3. # 3
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Last questions

Changes to Submission Form?
Are you able to make changes to the Hotspot submission form? There are several f...
0 Replies
Posted on Friday, 26 April 2024
  • New
  • Question regarding custom fields
    How do I access custom fields after I have created them?...
    0 Replies
    Posted on Wednesday, 24 April 2024
  • New
    • #custom fields
    Google no index für bestimmte Seiten/Details
    Hallo ich habe eine kleine Frage: wo kann ich einstellen, dass Google die Seite...
    0 Replies
    Posted on Wednesday, 24 April 2024
  • New
  • Language parameter in the link to the comment
    Hello. 1) I have a multilingual website (3 languages). If someone added a comme...
    1 Replies
    Posted on Saturday, 06 April 2024
    categories icon in header
    Hi! I saw this in the promo, but I can't find how to set it up. https://compo...
    0 Replies
    Posted on Monday, 22 April 2024
  • New
    • #style
    • #Categories