WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] cForms - one form displays, the other doesn't (3 posts)

  1. bravenewniche
    Member
    Posted 5 years ago #

    I've got cForms 10.3 and I've created two forms. I'm selecting the forms using the Tiny MCE button, and each one shows in their respective pages on the admin side.

    But on the live site, only one is displaying. I'm not getting any error messages on the admin end or on the live site. I had some HTML in one of the field names and I've removed that, thinking it was the culprit... no luck.

  2. bravenewniche
    Member
    Posted 5 years ago #

    Well, I've sort of resolved this.

    I had a call to an Inline Post '[[' 42 ']]' on the same page, and when I removed that, the form displayed no problem...

    Now to figure out how to get them to live together in peace and harmony.

  3. bravenewniche
    Member
    Posted 5 years ago #

    Since I was getting the conflict between Inline Post and cForm in the body of page, I turned to the page template and tried using Get_a_Post before The Loop, putting the content into a variable, and then calling the variable inside The Loop, like this:

    <?php 
    
    if (is_page(78)) { 
    
    get_a_post(76);
    $contactInfo = the_content();
    
    }
    
    ?>
    
    Then later, inside The Loop:
    
    <?php if (is_page(78)) { 
    
    print '<div id="contactbox">';
    echo $contactInfo;
    print '</div>';
    
    } ?>

    However, the problem there was that even though I was trying to assign the_content() to a variable, the_content() immediately printed out.

    So I used this at the top of the page instead:

    <?php
    if (is_page(78)) {
    get_a_post(76);
    $contactInfo = get_the_content();
    }

    And everything works fine - both the post content and the form show up in their proper places.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.