Forms

Using Optional Form Input Properties in Framer

Using Optional Form Input Properties in Framer

Using Optional Form Input Properties in Framer

Joseph

·

5:19

·

13K views

·

About this lesson

We’ve taken a good look at the default properties for an input like the type, name, and placeholder — but there are quite a few optional properties that can really come in handy. I’m going to go a little bit out of order, but let’s take a look at how each optional input property works.

https://www.youtube.com/watch?v=k71GT-33IAA&t=0s Intro

https://www.youtube.com/watch?v=k71GT-33IAA&t=18s The Auto Fill Property

https://www.youtube.com/watch?v=k71GT-33IAA&t=41s The Auto Focus Property

https://www.youtube.com/watch?v=k71GT-33IAA&t=65s The Value Property

https://www.youtube.com/watch?v=k71GT-33IAA&t=119s The Step, Min, and Max Properties

https://www.youtube.com/watch?v=k71GT-33IAA&t=175s The Hidden Property

https://www.youtube.com/watch?v=k71GT-33IAA&t=230s Linking your CMS to a Hidden Value

https://www.youtube.com/watch?v=k71GT-33IAA&t=282s Wrap up

🌞 Start for free: https://framer.link/yt

📚 Learn more at: https://framer.link/yt-academy

💎 Join the Community: https://framer.link/yt-community

🎉 Follow on X: https://framer.link/yt-x

0:00we've taken a good look at the default0:01properties for an input like the type0:03name and placeholder but there are quite0:06a few optional properties that can0:07really come in handy I'm going to go a0:09little bit out of order but let's take a0:11look at how each of the optional0:13properties0:14[Music]0:16works the first one on the list is0:18AutoFill which gives some control over0:21whether or not the browser or a password0:23manager should try to autofill just be0:26aware that every browser is different0:28and eager to help their users to0:29autofill the right info most browsers0:32will look at some combination of the0:33input type name and text label to figure0:36out what info to autofill so keep an eye0:39on how you're labeling things next we0:41have autofocus which will focus the0:44input immediately when the page loads as0:46if the user clicked on it or tabbed to0:48it this can be handy if the primary job0:50to be done on the page is filling out a0:52particular field since it'll save0:54visitors a step just be careful if your0:57form is below the fold because it could0:59cause the page to suddenly jump down and1:02make the visitor feel out of control1:04while we can use a placeholder to give a1:06visitor an example of what we expect1:08them to type in a field the value of the1:10field is still technically blank until1:13something gets typed in sometimes rather1:16than a placeholder we may want to give1:18the user an actual default value super1:22common example is a default order1:25quantity this number field has a1:27placeholder of one but again if the the1:30visitor hit submit there's no actual1:32data here so I can click the plus button1:36choose1:37value and set a value of one you'll1:41notice the text color changed from Gray1:42to White because this one isn't a1:45placeholder it's real data as if the1:47user typed it themselves and unlike a1:49placeholder a default value can be1:51incremented with the stepper controls on1:53a number input on that note now is the1:56perfect time to talk about the next set1:58of properties with number inputs most2:01browsers give us these stepper controls2:03to increment the value up and down and2:06by default the number increments or2:09decrements by one this is where the step2:12property comes in we can choose the size2:14of the increments and make it a whole2:17lot easier to step through larger values2:19you'll notice that there's really no2:21limit to how high or low the numbers can2:23go you may be thinking well zero is the2:26bottom but it's not number inputs2:29actually support negative values so to2:31impose some limits here we can add a Min2:34or Max property I'll add a2:37Min and leave it set to zero to prevent2:40negative numbers if we preview this we2:43can see we're all good technically2:46typing a value can go outside the Min2:49and max range but validation will kick2:50in and let the user know that something2:53needs2:54fixing this last one is probably the2:56most advanced of the bunch but you'll2:58know if you need it sometimes we may3:01want to add a bit of data to each form3:03submission without the visitor having to3:04see it or deal with it at all for3:08example we might want to know which blog3:10post the visitor was looking at when3:12they signed up for our mailing list do3:14we want to ask them to type the entire3:16title of the blog post probably not so3:19let's split this into two parts first3:21we'll create an input and have it3:23populate the blog title automatically3:26second will hide the input and the user3:29won't have to look at it think about it3:31or Worse try to edit it I'll start by3:35selecting the form and clicking the blue3:38plus icon to add a new input then choose3:42text I'll fix some of these3:45properties then I'll add the value3:47property so we have a place for the data3:49to populate now here's where the magic3:51happens since this is a CMS page we can3:54set a variable for this property that3:56populates automatically from whichever3:59CMS item is being viewed I'll set the4:02value to pull in the4:03title and there we have it the same4:06title that's being pulled into our4:07heading at the top of the page is also4:09being pulled into this form input now4:13all we got to do is hide the input by4:14clicking on the plus button and choosing4:17hidden you'll notice there's still an4:19extra Gap here but that's not from the4:21input itself it's from the label frame4:24around it to delete that label frame4:26without deleting the input inside of it4:27we can right click and choose choose4:30remove stack there we go now when this4:33form is submitted the data we receive4:35will contain the title of the blog post4:37being viewed when the visitor decided to4:40join our mailing list that's it now you4:43know how optional input properties like4:45autofill and autofocus work how to add a4:48default value to an input and how that's4:51different from placeholder how step Min4:54and Max works for number inputs and how4:57hidden inputs can be combined with your4:59CMS to get more info with each5:02submission now head to framer and start5:04using optional input properties with5:06your forms

Watch on YouTube ↗

More in this topic

Form Input Variants and Validation in Framer7:52
Form Input Variants and Validation in Framer
Forms18K views · 1 year ago
4 Ways to Update Form Status in Framer6:05
4 Ways to Update Form Status in Framer
Forms19K views · 1 year ago
Creating Custom Form Submit Buttons in Framer2:11
Creating Custom Form Submit Buttons in Framer
Forms18K views · 1 year ago
Introducing: Framer Forms0:48
Introducing: Framer Forms
Announcement93K views · 1 year ago
Framer Update: Forms16:32
Framer Update: Forms
Framer Update36K views · 1 year ago
Creating your first form in Framer10:59
Creating your first form in Framer
Forms108K views · 1 year ago
The Input Component5:04
The Input Component
Forms18K views · 3 years ago

Create a free website with Framer, the website builder loved by startups, designers and agencies.