I'm using Freeform 4 and I have to create a Tell a friend page to send e-mails to multiple friends (maximum of 10). Each friend input will have the friends Name + their e-mail address.
The form is variable (1 friend name / friend email input is shown, with a button to add more)
I already found out that I can use brackets for multiple recipients, e.g. I know have:
<label>Name friend 1</label>
<input type="text" name="friend_name[]">
<label>Emailaddress friend 1</label>
<input type="text" name="recipient_email_user[]">
<label>Name friend 2</label>
<input type="text" name="friend_name[]">
<label>Emailaddress friend 2</label>
<input type="text" name="recipient_email_user[]">
<a href="#">+ Add another friend</a>
My first question
How can I set the friend_name[] and recipient_email_user[] as required? I'm trying to show inline errors at the corresponding fields. Is this doable with Freeform?
My second question
How can I retrieve the friend_name[] in the notification so I can begin every e-mail to friends with Hi {name}?