Specify the "length" of form inputs?

Hi all,

I can’t seem to work this out. Could be something simple I am missing.

How do you set the input length? Right now each input I place in the form spans 100% of the form.

Thank you.

Hi @Garsen If by ‘length’ for form inputs (ex. input textfield) is size, you can set its width after give it a class first of course. But if it is ‘maxlength’ you referred to, no I don’t think we have it in Webflow.

1 Like

SOLVED!!

  1. Go to your form and click on a particular field that you want to limit the length in characters
  2. Select the cogwheel and under “Input Settings” check “Required”
  3. Under “Custom Attributes” click the “+” and a pop-up will appear saying “Add Attribute”
  4. Under “Name” enter “maxlength” without the “”… just … maxlength or it will not work.
  5. Under “Value” enter a number like 15 or 50 or 500. This will be the maximum length of characters and will define the statement {maxlength=“x”}. I usually use a value of 30 to 50 for name inputs or email. I will use a higher value of 200 to 300 on a text input field.
  6. Click “Save”
  7. If all goes correctly, you will now see a new Custom Attribute and it will look like … maxlength=“30” if you chose 30 as your Value.
  8. Go back to your form and preview mode to test the input maximum. The character input value will now be a maxlength=“x” or the value you entered for “x”.
  9. You can enter maxlength values for each individual form field.
  10. Good luck!!
13 Likes

This was aweosome help. thanks!