Using Migx with Formit

Hello everyone,

I’m using formit for a contact form that has a dropdown for topics. Based on the selected topic, the data will be send to a specific email address. The site admin must be able to manage the topics and emails, so I created a migx tv to store the topic-email pairs.

I’m displaying the topics in the form with getImageList, and they show correctly, but the email isn’t send, even though I get a success message. If I replace the getImageList call with hard coded options, the email gets through.
Here is my code:

<select name="subject" class="form-control">
       <option value="" disabled="" selected=""> [[ &namespace=`language` &topic=`default`]]</option>

and in the tpl I used both:
<option value="[[+topic]]">[[+topic]]</option>

<option [[!+fi.subject:FormItIsSelected=[[+topic]]]]>[[+topic]]</option>

With the same outcome, the email isn’t sent.
Any ideas why this happens?


Welcome back.
Can you share your formit call so we can try to help you?


<option [[!+fi.subject:FormItIsSelected=`[[+topic]]`]]>[[+topic]]</option>

You forgot the value here.

<option [[!+fi.subject:FormItIsSelected=`[[+topic]]`]] value="[[+topic]]">[[+topic]]</option>

1 Like


Thank you for your replies.

@jnogueira This is my formit call:

    &emailTpl=`ContactFormEmailChunk `
    &emailSubject=`MFA - Contact form`
    &successMessage=`<div class="alert alert-success container">
            <button type="button" class="close" data-dismiss="alert">&times;</button>
            <h5> [[%contact_form_thanks_message? &topic=`default` &namespace=`language`]]</h5>

@jako yeah, I noticed now, but I only forgot in this post, not in the tpl.

I found the reason the emails were not sent. I removed one of the test emails I was sending to, and after that, everything worked fine. I just don’t understand why was this happening. Any thoughts?