advancedforms / advanced-forms

WordPress plugin to create forms using Advanced Custom Fields
75 stars 14 forks source link

Feature Request: Make add_email_field_inserter filterable #32

Open angusdowling opened 6 years ago

angusdowling commented 6 years ago

In file advanced-forms/admin/admin-emails.php on line 21, a function named add_email_field_inserter exists. It's the function that adds the "insert field" button to dashboard fields.

I'm currently working on a plugin that integrates Mailchimp with Advanced Forms. I think it would be great if I could include my own custom fields in this list.

I noticed inside the function, there's a list of fields that receive this button:

$fields_to_add = array(
    'field_form_email_recipient_custom',
    'field_form_email_subject',
    'field_form_email_from',
);

Is it possible to make the variable $fields_to_add filterable?

Thanks!

fabianlindfors commented 6 years ago

Hi! Sounds like a pretty cool hook to add, I'll look into it. I really enjoy it when people extend my plugin hence I'd like to make it as convenient as possible!

You might also be interested to hear that I'll soon be launching a pro version of AF which includes a Mailchimp integration. Hoping to release it pretty soon!