• Resolved amcfarland

    (@amcfarland)


    Hello,

    I have set up a number of Yes/No toggles in a form but when I put the mail tag in the email message, it sends the shortcode; not the Yes or No answer.

    Can you please tell me how I can get this to work?

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Aurovrata Venet

    (@aurovrata)

    it sends the shortcode; not the Yes or No answer.

    You have a yes/no toggle. Do you have a firm field inside the toggle for a user optionally fill? It is this field you want to display as an email tag?

    Or is it that regardless if the fields included inside the toggle section you want to be able to show in a mail if the toggle was used?

    Thread Starter amcfarland

    (@amcfarland)

    In some cases, I have a field inside of the toggle for a user to optionally fill. In other cases, I do not.

    If it is the first case, I would like to know if they clicked Yes as well as their response to the question inside the toggled section.

    If it’s just a Yes/No toggle, I would like to know if they clicked Yes.

    So, Yes, I need to know if the toggle was used; they chose “Yes.”

    Thank you.

    Plugin Author Aurovrata Venet

    (@aurovrata)

    SO field values you can insert using the existing mail tags.

    For the actual toggle usage you will need to use the custom mail tag provided by the plugin and use a filter to programmatically fetch the toggle usage which are submitted as hidden fields from your form.

    All togles status in a form are submitted in a hidden field $_POST[‘_cf7sg_toggles’] as an associative array of

    
    <toggle-id>=><toggle title> | <affirmative label text>
    

    so if you have a toggle, your html will reveal the attribute id (<toggle-id>) identifier which you can change to something easier to read if you want.

    If you toggle question is “Do you speak English?” with “yes|no” swithc labels, and someone uses the toggled it will be submitted as:

    
    Do you speak English? | Yes
    

    you an use the ‘|’ character to split the text into the selected answer.

    See FAQ #11 that shows how this is used by the Post My CF7 Form plugin to store toggle status.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Toggle Mail Tags – Not Showing Data in Email’ is closed to new replies.