• I added Contact Form 7 to the sidebar with the help of the PHP Code widget:

    Here’s an example of the form:

    <p>Name:<br />[text* your-name 28/100]</p>
    <p>E-mail address:<br />[email* your-email 28/100]</p>
    <p>Phone number:<br />[text* your-phone 28/100]</p>
    <p>Message<br />[textarea* your-message 21x5]</p>
    <p>Attach File (optional)<br />
        [file your-file limit:15000000 filetypes:ace|arc|arj|doc|docx|dot|dotx|gif|jpg|jpeg|lha|pdf|pps|ppsx|ppt|pptx|tif|xls|xlsx|xlt|xltx|zip] </p>
    <p>[submit "Send"]</p>

    To use it in the sidebar, I installed the “PHP Code Widget” and placed the PHP Code widget on the sidebar. I then referenced the Contact Form 7 form from within the widget by entering

    <?php echo do_shortcode('[contact-form 4 "Sidebar Contact"]'); ?>

    I was able to specify a width for all of the fields involved except for the “file” field. Is there a way to restrict the width of the field to the left of the “Browse” button or to restrict the combined width of the field and the button?

    If so, that would be a great help. At present, the button gets partly cut off in the sidebar, due to space restrictions.

    https://www.ads-software.com/extend/plugins/contact-form-7/

  • The topic ‘[Plugin: Contact Form 7] How to resize “file” field?’ is closed to new replies.