Landing Page - Embed Form

Comments

5 comments

  • Ryan Franciscus

    Hey Don,

    Thank you for collaborating on the Community!  I just tried to replicate the issue and wasn't able to do so.  The select all checkbox should display when using the iframe method.  Does the select all checkbox show when you go to your landing page directly?

    0
    Comment actions Permalink
  • Don Tubel

    Hey Ryan,

    I just noticed that I incorrectly described the issue I am having. The select all checkbox is showing up on an Iframe but not on external post embed code.

    Yes, the select all checkbox shows up on my landing page when accessed directly.

    I've staged the different forms on a test page. You can see the behavior happening here.

    Thanks!

    0
    Comment actions Permalink
  • Ryan Franciscus

    Hey Don,

    Thanks for providing the URL of what you are experiencing. 

    The external form post code doesn't include the select all because it takes a bit of JavaScript to make this happen.  If you're interested in using the external form post code on the site instead of an iframe, please see the sample code below:
    Add the following script to the head section of the page:

    <script>
            function toggleAllCheckboxes(element){
                var groupName = element.getAttribute("name");
                var checkboxes = document.getElementsByName(groupName);
                for(var index=0; index<checkboxes.length; index++){
                    if(checkboxes[index] == element){
                        //skip select all block
                    }else{
                        if(checkboxes[index].type == "checkbox"){
                            checkboxes[index].checked = element.checked;
                        }
                    }
                }
            }
        </script>

    Then add this html bock to the External Post Code right before the first checkbox (you can also add this at the bottom, creative choice):

    <tr>
    <td style="width: 592px">
    <div class="checkbox_wrap">
    <input class="checkbox" label="Subscription group" name="SUBSCRIPTION_GROUP" type="checkbox" value="Select All" onclick="toggleAllCheckboxes(this);">
    <label class="checkbox_label">Select All</label>
    </div>
    </td>
    </tr>
    1
    Comment actions Permalink
  • Don Tubel

    Ryan,

    This worked well! I appreciate it!

    Is this documented somewhere? It's unfortunate that this functionality is not added automatically on external post embed code.

    Thanks to the community for the prompt help!

    0
    Comment actions Permalink
  • Ryan Franciscus

    Hey Don,

    I'm glad it's working!  Keep in mind that code can be used on all forms you may have with subscription groups.  I'm not sure if there is documentation on this specific use case, but I'll pass it along to our technical writers.

    Acoustic is always listening to their customers needs, wants, and ideas.  I encourage you to check out the ideas portal feel free to submit this as an idea or check out other ideas and vote on your favorites.  70 customer ideas have already been added to Campaign!

    0
    Comment actions Permalink

Please sign in to leave a comment.