WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Unwanted break tag inserted before form input (10 posts)

  1. Trailmix
    Member
    Posted 3 years ago #

    I have text and a form input on the same line in my code, but when a browser renders the page, there is a <br /> tag inserted before the <input> part of the form. I want to get rid of the break.

    My code (which is within a form):
    <td>Amount: <input name="a3" size="7" type="textfield" /></td>

    Source code rendered in a browser:
    <td>Amount: <br />
    <input name="a3" size="7" type="textfield" /></td>

    Why is the break tag popping in there?

  2. esmi
    Theme Diva & Forum Moderator
    Posted 3 years ago #

    Unless you provide a link to a page demonstrating the problem, no one will be able to offer much in the way of assistance.

  3. Trailmix
    Member
    Posted 2 years ago #

    http://brazilministry.com/donate/

    It's the 2nd PayPal form (monthly support) and I want the input box on the same line as "Amount".

    Here is my code for the form:

    [Code moderated as per the Forum Rules. Please use the pastebin]

  4. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    Either remove the line break between the Amount and the text input. Or apply a class to the form so it can be styled effectively.

  5. Trailmix
    Member
    Posted 2 years ago #

    I *don't have* a line break between the amount and text input. It's being auto-inserted. I tried to post my code but I see it was moderated out. I'll try posting just that single line:
    <tr><td>Amount: <input name="a3" size="7" type="textfield" /></td></tr>

    And my whole form code here:
    http://pastebin.com/vBp4DGJD

    You can see I don't have any break in my code, so why is the browser putting a break in there? Fwiw, I didn't notice this problem until I upgraded to the latest wp. (Although there is a chance I just didn't see it before.)

    Can you point me to info on how to apply a class to a form?

  6. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    <form class="paypal2" action="https://www.paypal.com/cgi-bin/webscr" method="post">

  7. Trailmix
    Member
    Posted 2 years ago #

    Thanks - I changed my form code but I'm not sure how to add the class to the stylesheet. I can edit the stylesheet, but don't know what to put in there to make sure the break isn't auto-inserted before the <input> field. I am really a beginner with css.

  8. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    Try:
    form.paypal2 br {display:none;}

  9. Trailmix
    Member
    Posted 2 years ago #

    Thank you Esmi, that works :)

  10. bholmes451
    Member
    Posted 2 years ago #

    Thank you as well.
    I've been struggling with this as well and this morning I discovered the
    tags being added. Thanks for the simple solution and you taught me a new trick with css :D

Topic Closed

This topic has been closed to new replies.

About this Topic