Viewing 5 replies - 1 through 5 (of 5 total)
  • I use Ordered List elements to display multiple fields on single line.

    HTML:

    <ol class="singleline">
    <li> <label for="cf7-phone">Phone</label> [text cf7-phone 15/]</li>
    <li> <label for="cf7-mobile">Mobile</label> [text cf7-mobile 15/]</li>

    Added to Form section of CF7 interface. tags are added for improved accessability.

    CSS:

    .wpcf7-form .singleline ol {
    list-style: none;
    margin: 0;
    }
    
    .wpcf7-form .singleline li{
    display: inline-block;
    float: left;
    margin-right: 10px;
    padding-right: 10px;
    }

    Added to Child Theme style.css

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    buzztone please be careful with your code blocks. It’s the backtick character not the single quote. Posting unclosed <ol> breaks the formatting here. I fixed your post.

    https://codex.www.ads-software.com/Forum_Welcome#Posting_Code

    @jan – yeah I copied it from somewhere else that requires single quotes to preserve as code. I started fixing it as well as soon as I saw the problem.

    Thread Starter hassan.Zia

    (@hassanzia)

    Guys what i did is used tables for this matter. and it worked.
    here is a sample code in-case anyone else comes here wondering.

    <table border=”1″>
    <tr>
    <td><p>Date
    [date EmploymentDate1]</p></td>
    <td><p>Description
    [text Description1 "Description"]</p></td>
    <td><p>Company Address
    [text CompanyAddress1 "Address"]</p></td>
    </tr>

    @hassan.Zia – Nowadays using HTML Tables to control form appearance is widely considered to be an ineffective, outdated and inappropriate solution. It is not an approach that I would recommend to other people. Instead use Firebug to find suitable CSS changes.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘three text fields in the same line’ is closed to new replies.