• Resolved Flash Marketing

    (@flashmarketingsolutions)


    There is an issue with the dynamic checkbox and how it is displayed in the message body when received in the email.

    This issue is compounded by each parent category in your taxonomy. For example I selected the last option on my list, ‘Sat-2-physics’, see green underlined, and all of the parent categories are returned in my email, see the red under lined….

    Can I just get the actual option that was selected

    The page I need help with: [log in to see the link]

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

    (@aurovrata)

    Can I just get the actual option that was selected

    sure, you should be able to, however, you’ll need to filter the values using the hook provided for the email tags. See this tutorial for more information.

    Thread Starter Flash Marketing

    (@flashmarketingsolutions)

    You are saying I can filter out the taxonomy?

    Am I filtering a tabled mail tag or filters?

    When I look at the post form submit hooks the fitler tabled/tabbed mail tags it looks like I need to use $data to adjust the array of submitted data

    I’m not a PHP expert but I don’t think this filter out the parent/taxonomy

    Could it be this: https://developer.www.ads-software.com/reference/classes/wp_term_query/__construct/

    Thread Starter Flash Marketing

    (@flashmarketingsolutions)

    add_filter( ‘cf7sg_dynamic_checkbox_taxonomy_query’,’dynamic_checkbox_725_taxonomy_query’,10,4);
    /**

    • Filter dropdown taxonomy query parameter.
    • (see https://developer.www.ads-software.com/reference/classes/wp_term_query/__construct/)
    • @param array $args array of taxonomy query attributes.
    • @param WPCF7_FormTag $tag the field being populated.
    • @param string $cf7_key the form unique key.
    • @param array $branch an array of term IDs representing the current taxonomy branch being queried, the last term is the query parent value.
    • @return array of query attributes.
      */
      function dynamic_checkbox_725_taxonomy_query($args, $tag, $cf7_key, $branch){
      //these are the label users will see when the dropdown opens.
      if(‘request-test’!==$cf7_key || ‘dynamic_checkbox-725’ !== $tag->name){
      return $args;
      }
      //use only the child terms of a parent.
      if($args[‘parent’]!=0) $args=null;
      // or if you want to list only the 2nd level of your tree,
      if(count($args)>2) $args=null;
      return $args;
    Plugin Author Aurovrata Venet

    (@aurovrata)

    You are saying I can filter out the taxonomy?

    no, you filter only the selected values, I am assuming you are displaying a tree HybirdDropdown field which gives you the entire branch selected in the mail tag, and you can filter it to display only the term you need.

    Am I filtering a tabled mail tag or filters?

    the tutorial is showing an example of a filtered mail tag which happens to be a repetitive table field, but in your case you have a dynamic dropdown field, and its corresponding mail tag can also filtered.

    I’m not a PHP expert but I don’t think this filter out the parent/taxonomy

    Indeed, you need to use the filter associate with your field mail tag. If you do not have any experience with PHP, I strongly suggest you get the help from someone who does to figure it out. You may also hire my services if your project has the budget ??

    Thread Starter Flash Marketing

    (@flashmarketingsolutions)

    @aurovrata could you contact me and let me know how much an update like this would cost?

    https://flashmarketingsolutions.com/contact-us/

    Plugin Author Aurovrata Venet

    (@aurovrata)

    sent you a message.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘dynamic_checkbox issue in message body’ is closed to new replies.