It would be nice to have custom fields for the signup block.

I've included a patch against HEAD that adds this support.

CommentFileSizeAuthor
cc_block_extra_fields.diff5.02 KBmedlefsen

Comments

justphp’s picture

Sounds good to me, I did not plan to implement custom fields but have made lots of changes recently and will be pushing a release this week.
I'll take a look at this patch tomorrow, have you tested it fully with the code that is in HEAD?.
The code in HEAD is fairly stable and should not have any bugs but if you notice anything please let me know.
Thanks,
James

justphp’s picture

Status: Active » Needs review
medlefsen’s picture

I've tested it with a different configurations and haven't found any errors. It doesn't give any warnings if you don't use the correct format for the mappings but that was the case with the registration page extra fields so I don't think it matters.

The patch fixes a bug that I encountered with HEAD which was that when the constant_contact_form_block_fields variable was an empty array the array_combine(array_values($extra_fields), array_values($extra_fields)) at admin.system.inc:234 would fail because array_combine() requires non-empty arguments, at least with my version of php.

Look forward to the next release.

Thanks,
Matt Edlefsen
xforty.com

justphp’s picture

I've reviewed your patch, thanks.

Couple of things.

1.) Thanks for fixing the invalid form field.

2.) I noticed you've tried to change the function I created to improve performance, thanks this made me think about this some more, I've not used your code from this but implemented a better method instead.

3.) You mentioned this patch adds custom fields support but I don't see how it does that, custom fields and extra fields are already implemented.

justphp’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.