• Resolved craigm1

    (@craigm1)


    Can someone help me with customising the length of the text box on my contact form. As can be seen only the first few fields are shortened (how i prefer), yet the comments box is still elongated? below is the code i believed to be correct and have implemented but this doesnt work. What custom css can i use or do i need to change this to my preference? Thank you in advance

    div.wpforms-container-full .wpforms-form .wpforms-field.wpforms-field-textarea textarea {
    width: 30px;! important:
    }

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • stylerforwpforms

    (@stylerforwpforms)

    Try the following code.. your form doesn’t have wpforms-container-full .. instead of that you can use wpforms-container class.

    Try the following code

    div.wpforms-container .wpforms-form .wpforms-field.wpforms-field-textarea textarea {
    width: 30px;! important:
    }
    Prashant Rai

    (@prashantrai)

    Hello @craigm1,

    Thanks for contacting us!

    To do what you mentioned we need some custom CSS, which I’ve included here:

    .wpforms-container .wpforms-field {
        max-width: 300px !important;
    }
    .wpforms-container input[type=date], .wpforms-container input[type=datetime], .wpforms-container input[type=datetime-local], .wpforms-container input[type=email], .wpforms-container input[type=month], .wpforms-container input[type=number], .wpforms-container input[type=password], .wpforms-container input[type=range], .wpforms-container input[type=search], .wpforms-container input[type=tel], .wpforms-container input[type=text], .wpforms-container input[type=time], .wpforms-container input[type=url], .wpforms-container input[type=week], .wpforms-container select, .wpforms-container textarea{
        max-width: 300px !important;
    }

    And in case it helps, here’s a great tutorial from WPBeginner on how to add custom CSS like this to your site: https://www.wpbeginner.com/plugins/how-to-easily-add-custom-css-to-your-wordpress-site/

    I hope this helps! When you’ve had a chance to give this a try, could you please let me know if this works for you?

    Thanks! ??

    Thread Starter craigm1

    (@craigm1)

    Thank you for responding @stylerforwpforms, the css you provided me with worked but only for the message box, which unfortunately was not entirely what i needed, but again many thanks all the same!

    @prashantrai thank you also for your response, this is exactly what i was after and has worked perfectly, enabling me to change the field sizes of all the input boxes within my form. Thank you kindly to you both for your support.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘customise text field length in wp forms’ is closed to new replies.