Hi @holylibor
I hope you are doing well.
I am happy to hear you enjoy the plugin.
Could you please share your form using pastebin.com or Google drive https://wpmudev.com/docs/wpmu-dev-plugins/forminator/#import-export then we can take a closer look.
Best Regards
Patrick Freitas
Hi Patrick,
Thank you very much for your replay. Sure, please feel free to download the form export from my Google drive: link
Thank you in advance for your support.
Best,
Libor
Hi @holylibor,
Hope this message finds you well.
Thanks for the form, currently, Email Notification for emails inside the Field group do require a snippet, our Second Line Support provide this:
<?php
add_filter( 'forminator_replace_form_data', 'wpmudev_replace_form_data_recipient', 10, 3 );
function wpmudev_replace_form_data_recipient( $content, $data, $original_content ) {
if ( $data['form_id'] != 6 ) {
return $content;
}
if ( strpos( $content, '{email-repeater}' ) !== false ) {
$emails = array();
foreach ( $data as $key => $value ) {
if ( strpos( $key , 'email-1' ) !== false ) {
$emails[] = $data[$key];
}
}
if ( ! empty( $emails ) ) {
$recipients = implode( ',', $emails );
$content = str_replace('{email-repeater}', $recipients , $content );
}
}
return $content;
}
It requires some customization:
– Replace number 6 with your form ID on this line:
if ( $data['form_id'] != 6 ) {
– Replace the email tag {email-1} with the one in your Field group on this line:
if ( strpos( $key , 'email-1' ) !== false ) {
– In the Email Notification recipient replace the email tag {email-?} with this macro: {email-repeater}
You might need to install it as a mu-plugin following the instructions on this link https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins.
Let us know the results.
Best regards,
Laura
Dear Laura,
Thank you very much for your help.
It works perfectly now!
May I bother you with an other question concerning Field group data structure or shall I open an other ticket?
Hi @holylibor
Please open a fresh ticket so we can follow up there separately in case it will be more complex and see can help in that matter.
Kind Regards,
Kris
OK, I will do so,
Thank you once again for your help. You can close this ticket now!