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

Complete Uninstall to Work in J4??
We have recently updated a site from Joomlav3 to v4 (4.4.2). Now when we go to m...
7 Replies
Posted on Tuesday, 30 April 2024
Info about CMigrator for Joomla
Hi i need to import a few thousand articles from a site made in wordprres to a ...
0 Replies
Posted on Tuesday, 07 May 2024
  • New
    • #CMigator
    Error on android phone
    Why its working good on Computer and if i try it with smartphones the map dosent...
    0 Replies
    Posted on Tuesday, 07 May 2024
  • New
  • Bug with front-end submission and table not having
    Hi, i think i found a problem. When trying to edit a hotspot from front-end ...
    3 Replies
    Posted on Wednesday, 15 March 2023
    Question regarding custom fields
    How do I access custom fields after I have created them?...
    1 Replies
    Posted on Wednesday, 24 April 2024
    • #custom fields