ddimitrioglo / jquery-mailchimp

jQuery plugin to simplify work with MailChimp forms
MIT License
10 stars 3 forks source link

Group checkbox #2

Open emmetje opened 6 years ago

emmetje commented 6 years ago

I love this script but I'm having trouble to retrieve data from the generated interest group fields.

<div class="mc-field-group input-group">
    <strong>Algemene nieuwsbrief </strong>
    <ul><li><input type="checkbox" value="1" name="group[20365][1]" id="mce-group[20365]-20365-0"><label for="mce-group[20365]-20365-0">Ik ontvang graag ook de algemene nieuwsbrief</label></li>
</ul>
</div>

Is there any way I can add that to the form? Many thanks in advance!

ddimitrioglo commented 6 years ago

Hi @emmetje,

Thanks for reaching out! I have not had a chance to work with group fields so please describe your form, in order to I could reproduce this issue on my side and try to figure out what I'm missing.

BRW, You also can provide me your form endpoint and I'll try to debug it.

emmetje commented 6 years ago

Hi @ddimitrioglo, thanks for your replay. The location of the form is here, all the code is inline: http://www.linqq.nl/mailchimp.html

ddimitrioglo commented 6 years ago

Thanks for link, Unfortunately, I'm at work now, will check and come with updates ~20:00 EEST

ddimitrioglo commented 6 years ago

Could you please provide embed form code here? It will help a lot to understand your flow. Thanks.

emmetje commented 6 years ago

I uploaded the mailchimp embed code here: http://www.linqq.nl/mailchimp-2.html

ddimitrioglo commented 6 years ago

Hmm, It's strange that there is nothing said about group here window.fnames = new Array(); window.ftypes = new Array();fnames[1]='FNAME';ftypes[1]='text';fnames[0]='EMAIL';ftypes[0]='email';fnames[2]='OPTIN';ftypes[2]='text'; That's weird... But, I'll take a look at home and come with updates in any case.

ddimitrioglo commented 6 years ago

Hi @emmetje,

I've made an investigation (because I haven't been using groups before) and got the groups concept and what you are trying to achieve.

Unfortunately, this is not supported now but I'll let this issue open and will allocate some time on the next week in order to add this functionality.

The main difference here from simple inputs is that groups could be checkboxes, radio buttons or dropdown, so they need proper handling.

P.S. Contributions are more than welcomed 😉

emmetje commented 6 years ago

@ddimitrioglo cool, thx I'll buy you a beer