• Hi
    I have a little problem with styling. I have create custom post types and in one of my template I have added contact form with some styling and it was looks great.
    But now i did some conditional statement
    <?php if($name == ‘Artur’){
    echo do_shortcode( ‘[contact-form-7 id=”273″ title=”Post name1″]’ );
    }elseif($name == ‘Richard’){
    echo do_shortcode( ‘[contact-form-7 id=”295″ title=”Post name1″]’ );
    }?>
    When i did this i have lost all my styling, now forms are displaying in default styling.
    How i can fix this.

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

Viewing 1 replies (of 1 total)
  • Hello, Good Day!

    Is there a way we can see the other style you have setup so we have something to compare. Also try wrapping up your form with a div in the backend part so that the styling set for the fields for example <div id=”basicform”>[shortcode]</div> will be carried over on the other form. In this case target fields will be close to generic and not specific to one form only. So you see what I mean I have a comparison for the style below.

    instead:
    #wpcf7-f273-p58-o1 input, #wpcf7-f273-p58-o1 textarea

    you can have it as:
    #basicform .wpcf7-form input, #basicform .wpcf7-form textarea

    If you have more questions or clarifications don’t hesitate to reply on this thread.

    • This reply was modified 6 years, 5 months ago by Ken Suarez.
Viewing 1 replies (of 1 total)
  • The topic ‘Lost forms styling using conditional statement’ is closed to new replies.